Erpnext initialization fixture for setup wizard


Is there any way to create a fixture for the setup wizard? I wanted to encapsulate all the data of a company together with customizations in my custom frappe app. I’ve created the fixtures (as migrations) for all the doctype, but after reinstalling the site but the migrations doesn’t work because they need data that is initilizated during the wizard setup.

Is there anyway to run the wizard unattended or maybe to use a fixture to initialize that data?

1 Like

Hey German, could you fix this problem of yours, I’m going throught the same problm, I need some custom informations in the setup wizard for the company, But I don’t know how to edit the form in the setup wizard!

You have to trace functions involved in the wizard starting from e.g. before_install and after_install directives in of Frappe and ERPNext.

I am interested in the same thing, I had to resort to a more simple venue, given a hint by ERPNext way of handling this. Basically checking if the setup wizard is done or not and exiting if is not done (just opposit of what ERPNext checks and exits).

It would need further digging into the process to catch where such aprameters/attributes can be handled in a custom_app situation.

1 Like

We use this in version 13:

        from import setup_complete

        if not frappe.get_all("Company", limit=1):
                                "full_name": "Test User",
                                "email": "",
                                "company_tagline": "What a great company",
                                "password": "demo",
                                "fy_start_date": "2024-01-01",
                                "fy_end_date": "2024-12-31",
                                "bank_account": "Big Bank",
                                "domains": ["Manufacturing"],
                                "company_name": "My Company Ltd",
                                "chart_of_accounts": "Standard",
                                "company_abbr": "MCL",
                                "currency": "EUR",
                                "timezone": "Europe/Berlin",
                                "country": "Germany",
                                "language": "english",