fix(Asset Repair): Revert to asset's previous status if repair is completed/cancelled

This commit is contained in:
GangaManoj 2021-05-13 05:02:10 +05:30
parent 1ac1cedfff
commit ec72f8956f

View File

@ -23,7 +23,8 @@ class AssetRepair(Document):
if self.repair_status == 'Pending':
frappe.db.set_value('Asset', self.asset, 'status', 'Out of Order')
else:
frappe.db.set_value('Asset', self.asset, 'status', 'Submitted')
asset = frappe.get_doc('Asset', self.asset)
asset.set_status()
def set_total_value(self):
for item in self.stock_items: