From now, when you install a theme, it load the data from xml to template table theme [ir.ui.view|ir.attachment|website.page|website.menu]. Data are only copied from this template table into the real table when you choose a theme on a website; Making them website_specific and with a link to the original to allow futur update. A special case is done to create theme.ir.ui.view when you are installing a theme, even if you continue to use template tag to create quick view. Co-authored-by: Derie Romain <rde@odoo.com> Co-authored-by: Kersten Jérémy <jke@odoo.com>
26 lines
616 B
Python
26 lines
616 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class Website(models.Model):
|
|
_name = "website"
|
|
_inherit = _name
|
|
|
|
def button_view_theme(self):
|
|
self._force()
|
|
return {
|
|
'type': 'ir.actions.act_url',
|
|
'url': '/web#action=website_theme_install.theme_install_kanban_action',
|
|
'target': 'self',
|
|
}
|
|
|
|
def button_go_website(self):
|
|
self._force()
|
|
return {
|
|
'type': 'ir.actions.act_url',
|
|
'url': '/',
|
|
'target': 'self',
|
|
}
|