commit | b961321de5447fe8049472f51ae89f1a3ff76665 | [log] [tgz] |
---|---|---|
author | anandbaburajan <anandbaburajan@gmail.com> | Fri Feb 03 22:58:22 2023 +0530 |
committer | anandbaburajan <anandbaburajan@gmail.com> | Fri Feb 03 22:58:22 2023 +0530 |
tree | 79d0daa7d27a55725bfef8165254551ae89e7459 | |
parent | 2cc7239dd580499f71c01d6647ab852827adf394 [diff] |
fix: allow PI cancel if linked asset is cancelled
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 54f0d94..4ff4428 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py
@@ -712,6 +712,8 @@ asset.purchase_date = self.posting_date asset.supplier = self.supplier elif self.docstatus == 2: + if asset.docstatus == 2: + break if asset.docstatus == 0: asset.set(field, None) asset.supplier = None