refactor: track completed app setup wizards and re-run the setup wizard upon new app installation. (backport #47691) (#48223)

* refactor: track completed app setup wizards and re-run the setup wizard upon new app installation. (#47691)

(cherry picked from commit 75b5ba6e67)

# Conflicts:
#	erpnext/hooks.py
#	erpnext/setup/install.py

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* fix: permission issue

* fix: space

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2025-06-24 14:51:15 +05:30
committed by GitHub
parent 5aed023434
commit 6511eb4c7c
5 changed files with 12 additions and 11 deletions

View File

@@ -39,13 +39,6 @@ def after_install():
frappe.db.commit()
def check_setup_wizard_not_completed():
if cint(frappe.db.get_single_value("System Settings", "setup_complete") or 0):
message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed.
You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall"""
frappe.throw(message) # nosemgrep
def check_frappe_version():
def major_version(v: str) -> str:
return v.split(".")[0]

View File

@@ -504,6 +504,7 @@ def update_stock_settings():
stock_settings.auto_insert_price_list_rate_if_missing = 1
stock_settings.update_price_list_based_on = "Rate"
stock_settings.set_qty_in_transactions_based_on_serial_no_input = 1
stock_settings.flags.ignore_permissions = True
stock_settings.save()