From bd748bd115655ed287eb7b37271586bbb1a8c6fb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 29 Jul 2014 08:51:41 +0530 Subject: [PATCH] [hotfix] [patch] Delete old print formats --- erpnext/patches.txt | 2 +- erpnext/patches/v4_2/delete_old_print_formats.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 676e0d186a..35ee608754 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 1456f95131..75c3619ae4 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)