mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +00:00
fix: add patch
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
Reference in New Issue
Block a user