patch: create custom field for accounting dimensions only if the field not exists already (#41484)

fix: create custom field for accounting dimensions only if the field not exists already
This commit is contained in:
Nabin Hait
2024-05-20 18:24:20 +05:30
committed by GitHub
parent a1d489195d
commit dfdb95bbbe

View File

@@ -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 = {