diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 019c97114fa..0adf4cc22a3 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -314,6 +314,9 @@ class Asset(AccountsController): ) def set_missing_values(self): + if not self.calculate_depreciation: + return + if not self.asset_category: self.asset_category = frappe.get_cached_value("Item", self.item_code, "asset_category") @@ -1300,7 +1303,7 @@ def create_new_asset_after_split(asset, split_qty): ) new_asset.insert() - + print(".............") add_asset_activity( new_asset.name, _("Asset created after being split from Asset {0}").format(get_link_to_form("Asset", asset.name)),