From 8e54aa882a6ad4add15c0a74ca61c1e042e2d304 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Oct 2011 19:03:19 +0530 Subject: [PATCH] patch for page break issue --- erpnext/patches/patch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py index ae73de8bf9d..cc4a164f841 100644 --- a/erpnext/patches/patch.py +++ b/erpnext/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 381 +last_patch = 382 #------------------------------------------- @@ -439,3 +439,12 @@ def execute(patch_no): clear_cache(webnotes.session['user']) elif patch_no == 381: reload_doc('stock', 'DocType Mapper', 'Purchase Order-Purchase Receipt') + elif patch_no == 382: + flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos'] + + st = "'"+"', '".join(flds)+"'" + sql("delete from `tabDocField` where fieldname in (%s) and parent = 'Features Setup'" % st) + sql("delete from `tabDefaultValue` where defkey in (%s) and parent = 'Control Panel'" % st) + + from webnotes.session_cache import clear_cache + clear_cache(webnotes.session['user'])