Hi all,
How can i get the data that enterd from the user while setup wizard of the site?
can i get it in a json file? or how it saved?
Thanks
Maysaa
Hi @MaysaaSafadi
Add setup_wiazrd_complete key with the path of the method in your custom apps. This method will call after the complete of the setup wizard, you can pass args in the method which contain the information entered by the user.
For more details check below files
doctype_js = {
"Address": "public/js/address.js",
"Communication": "public/js/communication.js",
"Event": "public/js/event.js",
"Newsletter": "public/js/newsletter.js",
"Contact": "public/js/contact.js",
}
override_doctype_class = {"Address": "erpnext.accounts.custom.address.ERPNextAddress"}
welcome_email = "erpnext.setup.utils.welcome_email"
# setup wizard
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
setup_wizard_stages = "erpnext.setup.setup_wizard.setup_wizard.get_setup_stages"
setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
after_install = "erpnext.setup.install.after_install"
from .operations import install_fixtures as fixtures
def get_setup_stages(args=None):
if frappe.db.sql("select name from tabCompany"):
stages = [
{
"status": _("Wrapping up"),
"fail_msg": _("Failed to login"),
"tasks": [{"fn": fin, "args": args, "fail_msg": _("Failed to login")}],
}
]
else:
stages = [
{
"status": _("Installing presets"),
"fail_msg": _("Failed to install presets"),
"tasks": [{"fn": stage_fixtures, "args": args, "fail_msg": _("Failed to install presets")}],
},
{
"status": _("Setting up company"),
1 Like