Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping config wizard #31

Open
rahul286 opened this issue Sep 14, 2023 · 4 comments
Open

Skipping config wizard #31

rahul286 opened this issue Sep 14, 2023 · 4 comments

Comments

@rahul286
Copy link
Member

Most Frappe apps require you to go through this.

Is there any CLI equivalent of wp option? If yes, its better to set these values by default.

We can take a config file approach e.g. ~/.fm.config or just read country, timezone and currency from OS.

CleanShot 2023-09-14 at 15 43 35

Something like following may work

#pip install geocoder pytz countryinfo

import geocoder 
import countryinfo
import pytz

# Get the user's location based on IP address
location = geocoder.ip('me')

country = location.country

currency = CountryInfo(country).currencies()[0]

# Get the user's timezone
user_timezone = pytz.timezone(pytz.country_timezones[country][0])

print(f"Country: {country}")
print(f"Currency: {currency}")
print(f"Timezone: {user_timezone}")
@Xieyt
Copy link
Collaborator

Xieyt commented Sep 19, 2023

There is an option to skip config wizard in frappe https://frappeframework.com/docs/user/en/basics/site_config#optional-settings but it's not working.
image

Other option is to execute/replicate date that should go into the code written here somehow https://github.com/frappe/frappe/blob/develop/frappe/desk/page/setup_wizard/setup_wizard.py
Or I will have to use selenium/scraping to input the information.

I have concern like config wizard changes when erpnext is installed and other apps can also add their own setup wizard, What can be done for this ?

@dhsathiya
Copy link
Member

dhsathiya commented Sep 20, 2023

Or I will have to use selenium/scraping to input the information.
This is not an ideal solution as the config wizard changes time to time. Also, this is majorly 1 time operation that takes < 1

minute. Adding Selenium for this will take more time and increase size of the package as well.

I have concern like config wizard changes when erpnext is installed and other apps can also add their own setup wizard, What can be done for this ?

Let's focus on ERPNext only for now.

@rahul286
Copy link
Member Author

There is an option to skip config wizard in frappe https://frappeframework.com/docs/user/en/basics/site_config#optional-settings but it's not working.

Lets wait to get it fixed in core.

@vorasmit
Copy link

https://github.com/frappe/frappe/blob/8129fe7268efecfb238aab62dba51755087d6257/frappe/desk/page/setup_wizard/setup_wizard.py#L48

This API could be used with default configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants