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 c7c611d929
commit fbeaabffc9

View File

@@ -755,6 +755,8 @@ class BuyingController(StockController, Subcontracting):
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