From 7b23dbf8470a5ac9587f46e9384fb883b79d9d0d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Oct 2011 19:00:54 +0530 Subject: [PATCH] patch for page break issue --- patches/patch.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/patches/patch.py b/patches/patch.py index f1aff7c162c..b66b4f04719 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 376 +last_patch = 377 #------------------------------------------- @@ -410,7 +410,16 @@ def execute(patch_no): clear_cache(webnotes.session['user']) elif patch_no == 376: reload_doc('stock', 'DocType Mapper', 'Purchase Order-Purchase Receipt') - elif patch_no == 377: + elif patch_no == 377: + 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']) + elif patch_no == 378: comp = sql("select name from tabCompany where docstatus!=2") fy = sql("select name from `tabFiscal Year` order by year_start_date asc") for c in comp: