fix: allow PI cancel if linked asset is cancelled

(cherry picked from commit b961321de5)
This commit is contained in:
anandbaburajan
2023-02-03 22:58:22 +05:30
committed by Mergify
parent 18a1707df9
commit c98b2b5918

View File

@@ -716,6 +716,8 @@ class BuyingController(SubcontractingController):
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