[hotfix] [patch] Delete old print formats
This commit is contained in:
parent
85eefadada
commit
bd748bd115
@ -72,4 +72,4 @@ execute:frappe.db.sql("update `tabAccount` set root_type='Liability' where root_
|
|||||||
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool")
|
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool")
|
||||||
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail")
|
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail")
|
||||||
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
|
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
|
||||||
erpnext.patches.v4_2.delete_old_print_formats
|
erpnext.patches.v4_2.delete_old_print_formats #2014-07-29
|
||||||
|
@ -15,9 +15,9 @@ def execute():
|
|||||||
for fmt in old_formats:
|
for fmt in old_formats:
|
||||||
# update property setter
|
# update property setter
|
||||||
for ps in frappe.db.sql_list("""select name from `tabProperty Setter`
|
for ps in frappe.db.sql_list("""select name from `tabProperty Setter`
|
||||||
where property_type='default_print_format' and value=%s""", fmt):
|
where property='default_print_format' and value=%s""", fmt):
|
||||||
ps = frappe.get_doc("Property Setter", ps)
|
ps = frappe.get_doc("Property Setter", ps)
|
||||||
ps.value = "Standard"
|
ps.value = "Standard"
|
||||||
ps.save(ignore_permissions = True)
|
ps.save(ignore_permissions = True)
|
||||||
|
|
||||||
frappe.delete_doc("Print Format", fmt)
|
frappe.delete_doc_if_exists("Print Format", fmt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user