mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-06 03:52:15 +00:00
fix: append finance book row only when calculate depreciation is checked
This commit is contained in:
@@ -314,6 +314,9 @@ class Asset(AccountsController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def set_missing_values(self):
|
def set_missing_values(self):
|
||||||
|
if not self.calculate_depreciation:
|
||||||
|
return
|
||||||
|
|
||||||
if not self.asset_category:
|
if not self.asset_category:
|
||||||
self.asset_category = frappe.get_cached_value("Item", self.item_code, "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()
|
new_asset.insert()
|
||||||
|
print(".............")
|
||||||
add_asset_activity(
|
add_asset_activity(
|
||||||
new_asset.name,
|
new_asset.name,
|
||||||
_("Asset created after being split from Asset {0}").format(get_link_to_form("Asset", asset.name)),
|
_("Asset created after being split from Asset {0}").format(get_link_to_form("Asset", asset.name)),
|
||||||
|
|||||||
Reference in New Issue
Block a user