diff options
| author | Jeremy Kersten <jke@odoo.com> | 2018-09-25 10:48:08 +0200 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2018-09-25 11:50:19 +0200 |
| commit | 9c5ee042a56c2baca304ca216439df5f1a237948 (patch) | |
| tree | 63d81f0ac25c01b6d0e0ea8974c50c0f8267203c /addons/website_theme_install/models/ir_module_module.py | |
| parent | 98ee0f766c50de799ef7eef79d8219326c38e31d (diff) | |
[FIX] website_theme_install: fix install theme
Active field was ignored in all case instead of just update
Button 'update theme' call wrong function
Diffstat (limited to 'addons/website_theme_install/models/ir_module_module.py')
| -rw-r--r-- | addons/website_theme_install/models/ir_module_module.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website_theme_install/models/ir_module_module.py b/addons/website_theme_install/models/ir_module_module.py index 8f7515c3a10..e074c58a515 100644 --- a/addons/website_theme_install/models/ir_module_module.py +++ b/addons/website_theme_install/models/ir_module_module.py @@ -141,7 +141,7 @@ class IrModuleModule(models.Model): if not find and model == 'ir.attachment': find = rec.copy_ids.search([('key', '=', rec.key), ('website_id', '=', website.id)]) - if model == 'ir.ui.view': + if old and model == 'ir.ui.view': # at update, ignore active field rec_data.pop('active') if find: @@ -215,8 +215,8 @@ class IrModuleModule(models.Model): self.ensure_one() mods_to_load = reversed(self + self.upstream_dependencies(exclude_states=('',)).filtered(lambda x: x.name.startswith('theme_'))) for mod in mods_to_load: - _logger.info('Load theme %s for website %s from template.' % (self.mapped('name'), website.id)) - self._load_one_theme_module(website, with_update=False) + _logger.info('Load theme %s for website %s from template.' % (mod.name, website.id)) + mod._load_one_theme_module(website, with_update=False) self.env['theme.utils']._post_copy(mod) @api.multi |
