[minor] [patch] replace doc.net_total/doc.conversion_rate with doc.net_total_export in custom print formats

This commit is contained in:
Anand Doshi 2013-07-22 15:37:48 +05:30
parent 5539333c8d
commit d81c320a32
2 changed files with 28 additions and 9 deletions

View File

@ -0,0 +1,15 @@
from __future__ import unicode_literals
import webnotes
import re
def execute():
for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No'"""):
changed = False
for match in re.findall("(doc.net_total.*doc.conversion_rate)", html):
if match.replace(" ", "") == "doc.net_total/doc.conversion_rate":
html = html.replace(match, "doc.net_total_export")
changed = True
if changed:
webnotes.conn.set_value("Print Format", name, "html", html)

View File

@ -163,9 +163,6 @@ patch_list = [
"patches.february_2013.p05_leave_application",
"patches.february_2013.gle_floating_point_issue_revisited",
"patches.february_2013.fix_outstanding",
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-02-19',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-02-19',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-02-19',
"execute:webnotes.delete_doc('DocType', 'Service Order')",
"execute:webnotes.delete_doc('DocType', 'Service Quotation')",
"execute:webnotes.delete_doc('DocType', 'Service Order Detail')",
@ -176,9 +173,6 @@ patch_list = [
"execute:webnotes.conn.sql(\"update `tabReport` set report_type=if(ifnull(query, '')='', 'Report Builder', 'Query Report') where is_standard='No'\")",
"execute:webnotes.conn.sql(\"update `tabReport` set report_name=name where ifnull(report_name,'')='' and is_standard='No'\")",
"patches.february_2013.p08_todo_query_report",
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Classic") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Modern") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
"execute:(not webnotes.conn.exists('Role', 'Projects Manager')) and webnotes.doc({'doctype':'Role', 'role_name':'Projects Manager'}).insert()",
"patches.february_2013.p09_remove_cancelled_warehouses",
"patches.march_2013.update_po_prevdoc_doctype",
@ -210,9 +204,6 @@ patch_list = [
"patches.april_2013.p01_update_serial_no_valuation_rate",
"patches.april_2013.p02_add_country_and_currency",
"patches.april_2013.p03_fixes_for_lead_in_quotation",
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',
"patches.april_2013.p04_reverse_modules_list",
"patches.april_2013.p04_update_role_in_pages",
"patches.april_2013.p05_update_file_data",
@ -257,4 +248,17 @@ patch_list = [
"patches.july_2013.p05_custom_doctypes_in_list_view",
"patches.july_2013.p06_same_sales_rate",
"patches.july_2013.p07_repost_billed_amt_in_sales_cycle",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Classic') # 2013-07-22",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Modern') # 2013-07-22",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Classic') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Modern') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Quotation Spartan') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Classic') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Modern') # 2013-07-22",
"execute:webnotes.reload_doc('selling', 'Print Format', 'Sales Order Spartan') # 2013-07-22",
"execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Classic') # 2013-07-22",
"execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Modern') # 2013-07-22",
"execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Spartan') # 2013-07-22",
"patches.july_2013.p08_custom_print_format_net_total_export",
]