fix: add patch

This commit is contained in:
l0gesh29
2025-08-12 14:28:18 +05:30
parent 42f9d27d79
commit 3cf765d985
2 changed files with 24 additions and 0 deletions

View File

@@ -434,3 +434,4 @@ erpnext.patches.v15_0.update_uae_zero_rated_fetch
erpnext.patches.v15_0.add_company_payment_gateway_account
erpnext.patches.v16_0.update_serial_no_reference_name
erpnext.patches.v16_0.set_invoice_type_in_pos_settings
erpnext.patches.v15_0.update_fieldname_in_accounting_dimension_filter

View File

@@ -0,0 +1,23 @@
import frappe
from frappe.query_builder import DocType
def execute():
ADF = DocType("Accounting Dimension Filter")
AD = DocType("Accounting Dimension")
accounting_dimension_filter = (
frappe.qb.from_(ADF)
.join(AD)
.on(AD.document_type == ADF.accounting_dimension)
.select(ADF.name, AD.fieldname)
).run(as_dict=True)
for doc in accounting_dimension_filter:
frappe.db.set_value(
"Accounting Dimension Filter",
doc.name,
"fieldname",
doc.fieldname,
update_modified=False,
)