Merge pull request #33946 from AnandBaburajan/cancel_pi_cancelled_asset
fix: allow cancelling purchase invoice if linked asset is already cancelled
This commit is contained in:
commit
9d8502f406
@ -712,6 +712,8 @@ class BuyingController(SubcontractingController):
|
|||||||
asset.purchase_date = self.posting_date
|
asset.purchase_date = self.posting_date
|
||||||
asset.supplier = self.supplier
|
asset.supplier = self.supplier
|
||||||
elif self.docstatus == 2:
|
elif self.docstatus == 2:
|
||||||
|
if asset.docstatus == 2:
|
||||||
|
continue
|
||||||
if asset.docstatus == 0:
|
if asset.docstatus == 0:
|
||||||
asset.set(field, None)
|
asset.set(field, None)
|
||||||
asset.supplier = None
|
asset.supplier = None
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user