Skip to content

Commit

Permalink
fix: allow PI cancel if linked asset is cancelled
Browse files Browse the repository at this point in the history
(cherry picked from commit b961321)
  • Loading branch information
anandbaburajan authored and mergify[bot] committed Feb 5, 2023
1 parent 18a1707 commit c98b2b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,8 @@ def update_fixed_asset(self, field, delete_asset=False):
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
Expand Down

0 comments on commit c98b2b5

Please sign in to comment.