mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
perf: don't validate for change on new documents
This commit is contained in:
@@ -306,7 +306,7 @@ class Item(Document):
|
||||
if self.stock_ledger_created():
|
||||
frappe.throw(_("Cannot be a fixed asset item as Stock Ledger is created."))
|
||||
|
||||
if not self.is_fixed_asset:
|
||||
if not self.is_fixed_asset and not self.is_new():
|
||||
asset = frappe.db.get_all("Asset", filters={"item_code": self.name, "docstatus": 1}, limit=1)
|
||||
if asset:
|
||||
frappe.throw(
|
||||
|
||||
Reference in New Issue
Block a user