diff --git a/erpnext/patches/june_2012/cms2.py b/erpnext/patches/june_2012/cms2.py index 721f8a73819..fee7b0199da 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 21ee3815bf6..00000000000 --- 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 ab95e9553d5..5a6748c966b 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