[FIX] website_theme_install: fix install theme
Active field was ignored in all case instead of just update Button 'update theme' call wrong function
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div t-attf-class="bg-gray-lighter #{has_screenshot? 'o_theme_screenshot' : (has_image ? 'o_theme_cover' : 'o_theme_logo')}" t-attf-style="background-image: url(#{image_url});"/>
|
||||
<div t-if="record.is_installed_on_current_website.raw_value" class="o_button_area">
|
||||
<button type="object" name="load_theme" class="btn btn-primary">Update theme</button>
|
||||
<button type="object" name="button_refresh_theme" class="btn btn-primary">Update theme</button>
|
||||
<hr />
|
||||
<button type="object" name="button_remove_theme" class="btn btn-secondary">Remove theme</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user