summaryrefslogtreecommitdiff
path: root/theme_common/models
diff options
context:
space:
mode:
Diffstat (limited to 'theme_common/models')
-rw-r--r--theme_common/models/__init__.py3
-rw-r--r--theme_common/models/__pycache__/__init__.cpython-36.pycbin0 -> 196 bytes
-rw-r--r--theme_common/models/__pycache__/theme_common.cpython-36.pycbin0 -> 663 bytes
-rw-r--r--theme_common/models/theme_common.py14
4 files changed, 17 insertions, 0 deletions
diff --git a/theme_common/models/__init__.py b/theme_common/models/__init__.py
new file mode 100644
index 0000000..ef70e5a
--- /dev/null
+++ b/theme_common/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from . import theme_common
diff --git a/theme_common/models/__pycache__/__init__.cpython-36.pyc b/theme_common/models/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..17d211a
--- /dev/null
+++ b/theme_common/models/__pycache__/__init__.cpython-36.pyc
Binary files differ
diff --git a/theme_common/models/__pycache__/theme_common.cpython-36.pyc b/theme_common/models/__pycache__/theme_common.cpython-36.pyc
new file mode 100644
index 0000000..b9e38dd
--- /dev/null
+++ b/theme_common/models/__pycache__/theme_common.cpython-36.pyc
Binary files differ
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')