[MERGE] forward port branch saas-15 up to 43eca3079e

This commit is contained in:
Christophe Simonis
2018-08-06 11:32:12 +02:00
2 changed files with 6 additions and 1 deletions
@@ -338,6 +338,8 @@ class AccountAssetAsset(models.Model):
'target': 'current',
'res_id': move_ids[0],
}
# Fallback, as if we just clicked on the smartbutton
return self.open_entries()
@api.multi
def set_to_draft(self):
+4 -1
View File
@@ -71,7 +71,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}