summaryrefslogtreecommitdiff
path: root/addons/theme_default/models/theme_default.py
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-08-30 12:38:27 +0200
committerqsm-odoo <qsm@odoo.com>2018-08-31 16:00:10 +0200
commit0b480f6b2c03fd96b42a78ed63cbe3420c6d533e (patch)
treeb7581a5cc14fd72a685b1b32eb39ed7411b837c4 /addons/theme_default/models/theme_default.py
parentf39b31930a83e12391cedf30d170cad71111271b (diff)
[FIX] website_theme_install, *: multi-website customization dialog
* theme_bootswatch, theme_default Before this commit, the customization dialog for themes was not multi-website. That means if a theme was installed on a website, the customization dialog was enabled for all the websites. Note: this commit uses the '_post_copy' system of theme installations for the first time and it had to be adapted a little bit.
Diffstat (limited to 'addons/theme_default/models/theme_default.py')
-rw-r--r--addons/theme_default/models/theme_default.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/theme_default/models/theme_default.py b/addons/theme_default/models/theme_default.py
new file mode 100644
index 00000000000..a8444cbb326
--- /dev/null
+++ b/addons/theme_default/models/theme_default.py
@@ -0,0 +1,7 @@
+from odoo import models
+
+class ThemeDefault(models.AbstractModel):
+ _inherit = 'theme.utils'
+
+ def _theme_default_post_copy(self, mod):
+ self.env.ref('website_theme_install.customize_modal').write({'active': False});