mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
update other_charges in custom print formats
This commit is contained in:
@@ -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.create_custom_fields_for_india_specific_fields
|
||||||
erpnext.patches.v4_0.save_default_letterhead
|
erpnext.patches.v4_0.save_default_letterhead
|
||||||
erpnext.patches.v4_0.update_custom_print_formats_for_renamed_fields
|
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)
|
||||||
Reference in New Issue
Block a user