mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-14 01:20:41 +00:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user