Browse Source

[Fix] Restrict access to setup wizard page if setup is already completed

develop
Rohit Waghchaure 8 years ago
parent
commit
d2e02a3023
  1. 9
      erpnext/setup/setup_wizard/setup_wizard.py

9
erpnext/setup/setup_wizard/setup_wizard.py

@ -20,6 +20,7 @@ def setup_complete(args=None):
install_fixtures.install(args.get("country"))
update_setup_wizard_access()
create_fiscal_year_and_company(args)
create_users(args)
set_defaults(args)
@ -53,6 +54,14 @@ def setup_complete(args=None):
pass
def update_setup_wizard_access():
setup_wizard = frappe.get_doc('Page', 'setup-wizard')
for roles in setup_wizard.roles:
if roles.role == 'System Manager':
roles.role = 'Administrator'
setup_wizard.flags.ignore_permissions = 1
setup_wizard.save()
def create_fiscal_year_and_company(args):
if (args.get('fy_start_date')):
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))

Loading…
Cancel
Save