diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 8e6b2c6889a..e3c275ae8e1 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -23,6 +23,7 @@ web_include_css = "assets/erpnext/css/website.css" setup_wizard_requires = "assets/erpnext/js/setup_wizard.js" setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete" +before_install = "erpnext.setup.install.check_setup_wizard_not_completed" after_install = "erpnext.setup.install.after_install" boot_session = "erpnext.startup.boot.boot_session" diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index dcb6eb31111..b4e19da0a09 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -17,6 +17,14 @@ def after_install(): add_web_forms() frappe.db.commit() +def check_setup_wizard_not_completed(): + if frappe.db.get_default('desktop:home_page') == 'desktop': + print + print "ERPNext can only be installed on a fresh site where the setup wizard is not completed" + print "You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall" + print + return False + def feature_setup(): """save global defaults and features setup""" doc = frappe.get_doc("Features Setup", "Features Setup")