mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 16:02:15 +00:00
fix: create custom field for accounting dimensions only if the field not exists already (#41557)
This commit is contained in:
@@ -13,8 +13,9 @@ def execute():
|
|||||||
for d in accounting_dimensions:
|
for d in accounting_dimensions:
|
||||||
doctype = "Asset Repair"
|
doctype = "Asset Repair"
|
||||||
field = frappe.db.get_value("Custom Field", {"dt": doctype, "fieldname": d.fieldname})
|
field = frappe.db.get_value("Custom Field", {"dt": doctype, "fieldname": d.fieldname})
|
||||||
|
docfield = frappe.db.get_value("DocField", {"parent": doctype, "fieldname": d.fieldname})
|
||||||
|
|
||||||
if field:
|
if field or docfield:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
df = {
|
df = {
|
||||||
|
|||||||
Reference in New Issue
Block a user