summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/theme_bootswatch/__init__.py1
-rw-r--r--addons/theme_bootswatch/data/theme_bootswatch_data.xml6
-rw-r--r--addons/theme_bootswatch/models/__init__.py3
-rw-r--r--addons/theme_bootswatch/models/theme_bootswatch.py7
-rw-r--r--addons/theme_default/__init__.py1
-rw-r--r--addons/theme_default/data/theme_default_data.xml4
-rw-r--r--addons/theme_default/models/__init__.py3
-rw-r--r--addons/theme_default/models/theme_default.py7
-rw-r--r--addons/website_theme_install/models/theme_models.py5
9 files changed, 26 insertions, 11 deletions
diff --git a/addons/theme_bootswatch/__init__.py b/addons/theme_bootswatch/__init__.py
index f331cf7cd78..4ec3ada1d15 100644
--- a/addons/theme_bootswatch/__init__.py
+++ b/addons/theme_bootswatch/__init__.py
@@ -1,2 +1,3 @@
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from . import models
diff --git a/addons/theme_bootswatch/data/theme_bootswatch_data.xml b/addons/theme_bootswatch/data/theme_bootswatch_data.xml
index 4a08164f879..21e118429f8 100644
--- a/addons/theme_bootswatch/data/theme_bootswatch_data.xml
+++ b/addons/theme_bootswatch/data/theme_bootswatch_data.xml
@@ -9,8 +9,4 @@
<field name="action_id" ref="action_website"/>
<field name="state">open</field>
</record>
-
- <record id="website_theme_install.customize_modal" model="ir.ui.view">
- <field name="active" eval="False"/>
- </record>
-</odoo> \ No newline at end of file
+</odoo>
diff --git a/addons/theme_bootswatch/models/__init__.py b/addons/theme_bootswatch/models/__init__.py
new file mode 100644
index 00000000000..1b8c8cd33a5
--- /dev/null
+++ b/addons/theme_bootswatch/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- encoding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from . import theme_bootswatch
diff --git a/addons/theme_bootswatch/models/theme_bootswatch.py b/addons/theme_bootswatch/models/theme_bootswatch.py
new file mode 100644
index 00000000000..dac7c310f46
--- /dev/null
+++ b/addons/theme_bootswatch/models/theme_bootswatch.py
@@ -0,0 +1,7 @@
+from odoo import models
+
+class ThemeBootswatch(models.AbstractModel):
+ _inherit = 'theme.utils'
+
+ def _theme_bootswatch_post_copy(self, mod):
+ self.env.ref('website_theme_install.customize_modal').write({'active': False});
diff --git a/addons/theme_default/__init__.py b/addons/theme_default/__init__.py
index f331cf7cd78..4ec3ada1d15 100644
--- a/addons/theme_default/__init__.py
+++ b/addons/theme_default/__init__.py
@@ -1,2 +1,3 @@
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from . import models
diff --git a/addons/theme_default/data/theme_default_data.xml b/addons/theme_default/data/theme_default_data.xml
index 424fcc0e38f..21e118429f8 100644
--- a/addons/theme_default/data/theme_default_data.xml
+++ b/addons/theme_default/data/theme_default_data.xml
@@ -9,8 +9,4 @@
<field name="action_id" ref="action_website"/>
<field name="state">open</field>
</record>
-
- <record id="website_theme_install.customize_modal" model="ir.ui.view">
- <field name="active" eval="False"/>
- </record>
</odoo>
diff --git a/addons/theme_default/models/__init__.py b/addons/theme_default/models/__init__.py
new file mode 100644
index 00000000000..7c320ce033a
--- /dev/null
+++ b/addons/theme_default/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- encoding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from . import theme_default
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});
diff --git a/addons/website_theme_install/models/theme_models.py b/addons/website_theme_install/models/theme_models.py
index 53463dc66c1..808af1e091e 100644
--- a/addons/website_theme_install/models/theme_models.py
+++ b/addons/website_theme_install/models/theme_models.py
@@ -63,11 +63,12 @@ class Theme(models.AbstractModel):
_auto = False
def _post_copy(self, mod):
+ website = self.env['website'].get_current_website()
theme_post_copy = '_%s_post_copy' % mod.name
if hasattr(self, theme_post_copy):
_logger.info('Executing method %s' % theme_post_copy)
- method = getattr(self, theme_post_copy)
- return method()
+ method = getattr(self.with_context(website_id=website.id), theme_post_copy)
+ return method(mod)
class IrUiView(models.Model):