update other_charges in custom print formats
This commit is contained in:
parent
46dc3b1442
commit
e7f2d3179d
@ -58,3 +58,4 @@ execute:frappe.reset_perms("Stock Ledger Entry") #2014-06-09
|
||||
erpnext.patches.v4_0.create_custom_fields_for_india_specific_fields
|
||||
erpnext.patches.v4_0.save_default_letterhead
|
||||
erpnext.patches.v4_0.update_custom_print_formats_for_renamed_fields
|
||||
erpnext.patches.v4_0.update_other_charges_in_custom_purchase_print_formats
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
import re
|
||||
|
||||
def execute():
|
||||
for name, html in frappe.db.sql("""select name, html from `tabPrint Format`
|
||||
where standard = 'No' and html like '%%purchase\\_tax\\_details%%'"""):
|
||||
html = re.sub(r"\bpurchase_tax_details\b", "other_charges", html)
|
||||
frappe.db.set_value("Print Format", name, "html", html)
|
Loading…
x
Reference in New Issue
Block a user