diff options
| author | Richard Sassine <richardsassine@tutanota.com> | 2021-05-04 18:00:38 +0300 |
|---|---|---|
| committer | Richard Sassine <richardsassine@tutanota.com> | 2021-05-04 18:00:38 +0300 |
| commit | ad97722b1b35aff50d0adf13a19715f7b8373c07 (patch) | |
| tree | edf36f1114b896a01602e31dafd74efe45736427 /theme_common/models | |
initial commit
Diffstat (limited to 'theme_common/models')
| -rw-r--r-- | theme_common/models/__init__.py | 3 | ||||
| -rw-r--r-- | theme_common/models/__pycache__/__init__.cpython-36.pyc | bin | 0 -> 196 bytes | |||
| -rw-r--r-- | theme_common/models/__pycache__/theme_common.cpython-36.pyc | bin | 0 -> 663 bytes | |||
| -rw-r--r-- | theme_common/models/theme_common.py | 14 |
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 Binary files differnew file mode 100644 index 0000000..17d211a --- /dev/null +++ b/theme_common/models/__pycache__/__init__.cpython-36.pyc diff --git a/theme_common/models/__pycache__/theme_common.cpython-36.pyc b/theme_common/models/__pycache__/theme_common.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..b9e38dd --- /dev/null +++ b/theme_common/models/__pycache__/theme_common.cpython-36.pyc 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') |
