[FIX] base: set currency on a new db
Open the web/database/manager and create a db with a country set. The country of the first company will be set to the country set on the form Before this commit, the currency was not set, eventhough it is a field on res.country After this commit, we also set the currency of the first company opw 1869435 closes #26097
This commit is contained in:
+4
-1
@@ -58,7 +58,10 @@ def _initialize_db(id, db_name, demo, lang, user_password, login='admin', countr
|
||||
if country_code:
|
||||
countries = env['res.country'].search([('code', 'ilike', country_code)])
|
||||
if countries:
|
||||
env['res.company'].browse(1).country_id = countries[0]
|
||||
comp_local = {'country_id': countries[0].id}
|
||||
if countries[0].currency_id:
|
||||
comp_local['currency_id'] = countries[0].currency_id.id
|
||||
env['res.company'].browse(1).write(comp_local)
|
||||
|
||||
# update admin's password and lang and login
|
||||
values = {'password': user_password, 'lang': lang}
|
||||
|
||||
Reference in New Issue
Block a user