chore: remove unused function
diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py
index e953333..ca6be9b 100644
--- a/erpnext/assets/doctype/asset/asset.py
+++ b/erpnext/assets/doctype/asset/asset.py
@@ -654,7 +654,7 @@
self.db_set("status", status)
def get_status(self):
- """Returns status based on whether it is draft, submitted, sold, scrapped or depreciated"""
+ """Returns status based on whether it is draft, submitted, scrapped or depreciated"""
if self.docstatus == 0:
status = "Draft"
elif self.docstatus == 1:
@@ -676,21 +676,6 @@
status = "Cancelled"
return status
- def is_sold(self):
- item = frappe.qb.DocType("Sales Invoice Item").as_("item")
- si = frappe.qb.DocType("Sales Invoice").as_("si")
-
- asset_sales_invoice = (
- frappe.qb.from_(item)
- .select(item.parent)
- .inner_join(si)
- .on(item.parent == si.name)
- .where(item.asset == self.name)
- .where(si.docstatus == 1)
- ).run()
-
- return True if asset_sales_invoice else False
-
def get_default_finance_book_idx(self):
if not self.get("default_finance_book") and self.company:
self.default_finance_book = erpnext.get_default_finance_book(self.company)