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

@@ -8,6 +8,13 @@ frappe.pages["setup-wizard"].on_page_load = function (wrapper) {
};
frappe.setup.on("before_load", function () {
if (
frappe.boot.setup_wizard_completed_apps?.length &&
frappe.boot.setup_wizard_completed_apps.includes("erpnext")
) {
return;
}
erpnext.setup.slides_settings.map(frappe.setup.add_slide);
});
@@ -96,7 +103,7 @@ erpnext.setup.slides_settings = [
},
set_fy_dates: function (slide) {
var country = frappe.wizard.values.country;
var country = frappe.wizard.values.country || frappe.defaults.get_default("country");
if (country) {
let fy = erpnext.setup.fiscal_years[country];
@@ -118,7 +125,7 @@ erpnext.setup.slides_settings = [
},
load_chart_of_accounts: function (slide) {
let country = frappe.wizard.values.country;
let country = frappe.wizard.values.country || frappe.defaults.get_default("country");
if (country) {
frappe.call({