-
Notifications
You must be signed in to change notification settings - Fork 62
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
[initdb] add user and lang options #101
base: master
Are you sure you want to change the base?
Conversation
Hi @sbidoul, Here is our first proposal to add the option to set username, password, language and all those options with the initdb command. At the moment, country and language seem to be working fine but login, password and phone aren't. Regards |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #101 +/- ##
==========================================
- Coverage 93.19% 92.69% -0.51%
==========================================
Files 14 14
Lines 896 903 +7
Branches 149 157 +8
==========================================
+ Hits 835 837 +2
- Misses 43 45 +2
- Partials 18 21 +3 ☔ View full report in Codecov by Sentry. |
Hi @sbidoul , |
Otherwise, I don't remember why _initialize_db was not used, sorry. |
Hi @sbidoul , So if we continue in the direction of using this method there https://github.com/acsone/click-odoo-contrib/pull/101/files#diff-7ef2b7bba0483174747437d28282a83c065ceb8bed4021ed382ebdacc021ce91R72 could it be a valid contribution for you or do you have some requirements to share with us? Regards |
* add new params for initdb. add login password lang and country * fix no cache with specific modules * fix no cache with specific modules
ping @sbidoul PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comment.
This would need tests.
click_odoo_contrib/initdb.py
Outdated
if new_database: | ||
odoo_createdb(new_database, demo, module_names, False) | ||
odoo_createdb_without_cache(new_database, demo,module_names, lang, password, login, country, phone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the cache options, controls the caching of database templates. This apparently merely disables _save_installed_checksums, which I think is good to preserve in this branch too.
Actually, there should be no reason to not cache in this case, and this should be doable easily by including lang, password, etc in the addons_hash()
function, like the demo
flag is already handled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that phone was not supported in older Odoo versions ?
README.rst
Outdated
--login TEXT Set admin login. | ||
Imcompatibility with --cache. [default: admin] | ||
--country TEXT Set default country. | ||
Imcompatibility with --cache. [default: GB] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is GB the default for Odoo ?
Hi @sbidoul thanks for your feedback, @gaelTorrecillas and @MAG-Florian-Chevalier will have a look to your comments |
And thanks for contributing :) |
we're fan of your modules, so we're contributing |
Hi @sbidoul, we've changed the code according to your comments. |
ping @sbidoul , any chance to have an additional review |
Sorry for the delay I've been very busy on other things. I'll get back to this as soon as I can. In the meantime can you look at the test failures? |
Hi, I had a quick look at the tests.
|
Hi @sbidoul a great thanks for this feedback |
@gaelTorrecillas @MAG-Florian-Chevalier could you have a look to this please |
Hi, this PR could be really useful, any change that it will be merged soon ? Thanks ! |
Hi, this PR could be really useful, any change that it will be merged soon ? Thanks ! +1 |
I had lost track of this, sorry for the delay. This would need tests. Also, I think there should be a warning or an error (not sure) if these new options are used with |
#54
#52