summaryrefslogtreecommitdiff
path: root/theme_common/models/theme_common.py
diff options
context:
space:
mode:
authorRichard Sassine <richardsassine@tutanota.com>2021-05-04 18:00:38 +0300
committerRichard Sassine <richardsassine@tutanota.com>2021-05-04 18:00:38 +0300
commitad97722b1b35aff50d0adf13a19715f7b8373c07 (patch)
treeedf36f1114b896a01602e31dafd74efe45736427 /theme_common/models/theme_common.py
initial commit
Diffstat (limited to 'theme_common/models/theme_common.py')
-rw-r--r--theme_common/models/theme_common.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/theme_common/models/theme_common.py b/theme_common/models/theme_common.py
new file mode 100644
index 0000000..7e39a15
--- /dev/null
+++ b/theme_common/models/theme_common.py
@@ -0,0 +1,14 @@
+from odoo import models
+
+
+class ThemeCommon(models.AbstractModel):
+ _inherit = 'theme.utils'
+
+ def _theme_common_post_copy(self, mod):
+ # Reset all default color when switching themes
+ for nb in range(2, 9):
+ self.disable_view('theme_common.option_colors_%02d_variables' % nb)
+
+ # For compatibility
+ # self.enable_view('theme_common.compatibility-saas-11-4-variables')
+ # self.enable_view('theme_common.compatibility-saas-11-4')