diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 676e0d186a6..35ee608754d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -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 Detail") 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 diff --git a/erpnext/patches/v4_2/delete_old_print_formats.py b/erpnext/patches/v4_2/delete_old_print_formats.py index 1456f95131f..75c3619ae4f 100644 --- a/erpnext/patches/v4_2/delete_old_print_formats.py +++ b/erpnext/patches/v4_2/delete_old_print_formats.py @@ -15,9 +15,9 @@ def execute(): for fmt in old_formats: # update property 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.value = "Standard" ps.save(ignore_permissions = True) - frappe.delete_doc("Print Format", fmt) + frappe.delete_doc_if_exists("Print Format", fmt)