From c4eb9bf838f218116b65783075fa9e09917f05a2 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 12 Jul 2012 19:15:52 +0530 Subject: [PATCH] cms2 patch updates --- erpnext/patches/june_2012/cms2.py | 15 ++++++++++++++- erpnext/patches/may_2012/cms.py | 12 ------------ erpnext/patches/patch_list.py | 10 +++++----- 3 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 erpnext/patches/may_2012/cms.py diff --git a/erpnext/patches/june_2012/cms2.py b/erpnext/patches/june_2012/cms2.py index 721f8a7381..fee7b0199d 100644 --- a/erpnext/patches/june_2012/cms2.py +++ b/erpnext/patches/june_2012/cms2.py @@ -13,6 +13,8 @@ def execute(): save_pages() + save_website_settings() + def cleanup(): import webnotes @@ -57,4 +59,15 @@ def save_pages(): for dt in query_map: for result in webnotes.conn.sql(query_map[dt], as_dict=1): - DocList(dt, result['name']).save() \ No newline at end of file + DocList(dt, result['name']).save() + +def save_website_settings(): + from webnotes.model.code import get_obj + + # rewrite pages + get_obj('Website Settings').on_update() + + ss = get_obj('Style Settings') + ss.validate() + ss.doc.save() + ss.on_update() \ No newline at end of file diff --git a/erpnext/patches/may_2012/cms.py b/erpnext/patches/may_2012/cms.py deleted file mode 100644 index 21ee3815bf..0000000000 --- a/erpnext/patches/may_2012/cms.py +++ /dev/null @@ -1,12 +0,0 @@ -import webnotes - -def execute(): - from webnotes.model.code import get_obj - - # rewrite pages - get_obj('Website Settings').on_update() - - ss = get_obj('Style Settings') - ss.validate() - ss.doc.save() - ss.on_update() \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index ab95e9553d..5a6748c966 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -337,11 +337,6 @@ patch_list = [ 'patch_file': 'stock_reco_patch', 'description': 'stock reco patch: store diff info in field' }, - { - 'patch_module': 'patches.may_2012', - 'patch_file': 'cms', - 'description': 'generate html pages' - }, { 'patch_module': 'patches.may_2012', 'patch_file': 'reload_reports', @@ -487,4 +482,9 @@ patch_list = [ 'patch_file': 'deprecate_import_data_control', 'description': "deprecate doctype - Import Data Control and page - Import Data" }, + { + 'patch_module': 'patches.june_2012', + 'patch_file': 'cms2', + 'description': 'cms2 release patches' + }, ] \ No newline at end of file