mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
fix: circular dependency during asset cancellation (#18952)
This commit is contained in:
committed by
Nabin Hait
parent
8c9fd62775
commit
690139ca11
@@ -286,12 +286,6 @@ class Asset(AccountsController):
|
||||
if self.status not in ("Submitted", "Partially Depreciated", "Fully Depreciated"):
|
||||
frappe.throw(_("Asset cannot be cancelled, as it is already {0}").format(self.status))
|
||||
|
||||
if self.purchase_invoice:
|
||||
frappe.throw(_("Please cancel Purchase Invoice {0} first").format(self.purchase_invoice))
|
||||
|
||||
if self.purchase_receipt:
|
||||
frappe.throw(_("Please cancel Purchase Receipt {0} first").format(self.purchase_receipt))
|
||||
|
||||
def delete_depreciation_entries(self):
|
||||
for d in self.get("schedules"):
|
||||
if d.journal_entry:
|
||||
|
||||
Reference in New Issue
Block a user