summaryrefslogtreecommitdiff
path: root/odoo/addons/base/module/wizard/base_language_install.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-15 13:58:55 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-15 13:58:55 +0100
commitdece72d010e23c88bdf5b2a1ace6ff0df2b2732f (patch)
treef9fc12d1f2f5f51acca168854702f75e316e1f0b /odoo/addons/base/module/wizard/base_language_install.py
parent22d7be5b7397f9d9a811e071601a9ad07762dc55 (diff)
parentca2003839a9abc3f76f48d2382d512a4546aeab1 (diff)
[MERGE] forward port branch saas-12 up to ca20038
Diffstat (limited to 'odoo/addons/base/module/wizard/base_language_install.py')
-rw-r--r--odoo/addons/base/module/wizard/base_language_install.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/odoo/addons/base/module/wizard/base_language_install.py b/odoo/addons/base/module/wizard/base_language_install.py
index e8dba882fc8..10fb90311fa 100644
--- a/odoo/addons/base/module/wizard/base_language_install.py
+++ b/odoo/addons/base/module/wizard/base_language_install.py
@@ -20,11 +20,10 @@ class BaseLanguageInstall(models.TransientModel):
@api.multi
def lang_install(self):
- this = self[0]
- this = this.with_context(overwrite=this.overwrite)
+ self.ensure_one()
mods = self.env['ir.module.module'].search([('state', '=', 'installed')])
- mods.update_translations(this.lang)
- this.state = 'done'
+ mods.with_context(overwrite=self.overwrite).update_translations(self.lang)
+ self.state = 'done'
return {
'name': _('Language Pack'),
'view_type': 'form',
@@ -35,5 +34,5 @@ class BaseLanguageInstall(models.TransientModel):
'context': dict(self._context, active_ids=self.ids),
'type': 'ir.actions.act_window',
'target': 'new',
- 'res_id': this.id,
+ 'res_id': self.id,
}