diff --git a/erpnext/patches/jan_mar_2012/add_roles_to_admin.py b/erpnext/patches/jan_mar_2012/add_roles_to_admin.py new file mode 100644 index 00000000000..402675ae2cd --- /dev/null +++ b/erpnext/patches/jan_mar_2012/add_roles_to_admin.py @@ -0,0 +1,10 @@ +def execute(): + """ + Adds various roles to Administrator. This patch is for making master db + ready for on premise installation + """ + import webnotes + from webnotes.model.code import get_obj + from webnotes.model.doc import Document + sc = get_obj('Setup Control', 'Setup Control') + sc.add_roles(Document('Profile', 'Administrator')) diff --git a/erpnext/patches/jan_mar_2012/label_cleanup.py b/erpnext/patches/jan_mar_2012/label_cleanup.py index a6aae9ad555..93536fa2b90 100644 --- a/erpnext/patches/jan_mar_2012/label_cleanup.py +++ b/erpnext/patches/jan_mar_2012/label_cleanup.py @@ -40,3 +40,8 @@ def execute(): delete_doc('DocType', 'Update Delivery Date Detail') + # Reload print formats + reload_doc('accounts', 'Print Format', 'Sales Invoice Classic') + reload_doc('accounts', 'Print Format', 'Sales Invoice Modern') + reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan') + diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 6c66f75c52d..021cf0042bf 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -157,4 +157,14 @@ patch_list = [ 'patch_file': 'navupdate', 'description': 'New Navigation Pages' }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'label_cleanup', + 'description': 'Remove extra fields and new dynamic labels' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'add_roles_to_admin', + 'description': 'Add Roles to Administrator' + }, ]