diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 1e64f74b372..b929eda7d6a 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -482,6 +482,9 @@ class Asset(AccountsController): frappe.throw(_("Available-for-use Date should be after purchase date")) def validate_linked_purchase_documents(self): + if self.flags.is_split_asset: + return + for fieldname, doctype in [ ("purchase_receipt", "Purchase Receipt"), ("purchase_invoice", "Purchase Invoice"), @@ -1378,6 +1381,7 @@ def process_asset_split(existing_asset, split_qty, splitted_asset=None, is_new_a scaling_factor = flt(split_qty) / flt(existing_asset.asset_quantity) new_asset = frappe.copy_doc(existing_asset) if is_new_asset else splitted_asset asset_doc = new_asset if is_new_asset else existing_asset + asset_doc.flags.is_split_asset = True set_split_asset_values(asset_doc, scaling_factor, split_qty, existing_asset, is_new_asset) log_asset_activity(existing_asset, asset_doc, splitted_asset, is_new_asset)