fix: set status to Draft for auto-created assets from Purchase Receipt

(cherry picked from commit 20c2cb40d1)

# Conflicts:
#	erpnext/assets/doctype/asset/asset.py
#	erpnext/patches.txt
This commit is contained in:
khushi8112
2025-10-23 17:41:51 +05:30
committed by Mergify
parent 977464e6a7
commit d8eddbfd03
4 changed files with 31 additions and 0 deletions

View File

@@ -131,6 +131,13 @@ class Asset(AccountsController):
self.set_missing_values()
self.validate_gross_and_purchase_amount()
self.validate_finance_books()
<<<<<<< HEAD
=======
def before_save(self):
self.total_asset_cost = self.net_purchase_amount + self.additional_asset_cost
self.status = self.get_status()
>>>>>>> 20c2cb40d1 (fix: set status to Draft for auto-created assets from Purchase Receipt)
if not self.split_from:
self.prepare_depreciation_data()