Website Multi Theme

website_multi_theme
REPOSITORY
REPOSITORYOCA/website
GIT
GIThttps://github.com/OCA/website.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/website/tree/11.0/website_multi_theme
VERSION
VERSION 1.6.1
CATEGORY
CATEGORYWebsite
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Onestein, IT-Projects LLC
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Onestein, IT-Projects LLC
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Jairo Llopis, Ivan Yelizariev, OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttps://www.tecnativa.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - website
    - web
    - base
    - web_editor
    - web_planner
    - http_routing
    - portal
    - mail
    - base_setup
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES lessc
sass
scss
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
assets_editor assets_editor ir.ui.view qweb Inherits website.assets_editor
assets_pattern Empty assets_frontend pattern ir.ui.view qweb Inherits website.assets_frontend
demo_page_view Multi website theme demo page ir.ui.view qweb New
layout_pattern Main layout ir.ui.view qweb Inherits website.layout
s_demo1 Demo Cat ir.ui.view qweb New
s_demo2 Demo Dog ir.ui.view qweb New
snippet_selection snippet_selection ir.ui.view qweb Inherits website.snippets
theme_demo_assets_frontend Demo multiwebsite theme ir.ui.view qweb Inherits website.assets_frontend
user_navbar user_navbar ir.ui.view qweb Inherits website.user_navbar
view_view_form_extend ir.ui.view xpath Inherits base.view_view_form
view_website_config_settings Add theme selector res.config.settings field Inherits website.res_config_settings_view_form
view_website_form website xpath Inherits website.view_website_form
website_menu_search website_menu_search website.menu search New
website_pages_tree_view website.page xpath Inherits website.website_pages_tree_view
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals)
    @api.model
    Catch cases of creating customize_show views. Reload theme to make new customize_show view available right after new module installation. It's also needed for CI tests when another modules expects new item in "Customize menu". We cannot override ir.ui.view model to do it, because it's created before creating ir.model.data, which is essential for multi_theme_reload FIXME: themes are reloaded as much times as new module has views with customize_show

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • multitheme_copy_ids One2many → ir.ui.view
    help='Duplicates of this view' readonly=True string='Copies' args: 'ir.ui.view', 'origin_view_id'
  • origin_view_id Many2one → ir.ui.view
    help='View from where this one was copied for multi-website' readonly=True string='Copied from' args: 'ir.ui.view'
  • was_active Boolean
    help='Indicates if the view was originally active before converting the single website theme that owns it to multi website mode.' readonly=True
Public methods (2)
  • get_related_views(self, key, bundles=False)
    @api.model
    This method is used to prepare items in 'Customize' menu of website Editor
  • search(self, domain, offset=0, limit=None, order=None, count=False)

New fields (1)
  • multi_theme_id Many2one
    related='website_id.multi_theme_id'
Public methods (1)
  • multi_theme_reload(self)
    Update multiwebsite themes when loading a new wizard.

New fields (3)
  • base_url Char
  • multi_theme_id Many2one → website.theme
    comodel_name='website.theme' default=<expr> domain=[('has_assets', '=', True)] help='Multiwebsite-compatible theme for this website' string='Multiwebsite theme'
  • multi_theme_view_ids One2many → ir.ui.view
    comodel_name='ir.ui.view' domain=[('origin_view_id', '!=', False), '|', ('active', '=', True), ('active', '=', False)] help='Views generated by the multiwebsite theme just for this website' inverse_name='website_id' string='Multiwebsite views'
Public methods (2)
  • create(self, vals)
    @api.model
  • write(self, vals)

New fields (5)
  • asset_ids One2many → website.theme.asset
    comodel_name='website.theme.asset' help='Asset views that will be disabled by default and enabled only in websites that enable this theme in multiwebsite mode.' inverse_name='theme_id' string='Assets'
  • converted_theme_addon Char
    help='Name of the theme addon that is being converted from single to multi website mode.'
  • dependency_ids Many2many → website.theme
    help='If theme is splitted in different theme-modules, they should be in this list. "Default theme" should be here too in order to make some features (e.g. footer) work on each website independently' string='Sub-themes' args: 'website.theme', 'website_theme_dependency_rel', 'theme1', 'theme2'
  • has_assets Boolean
    compute='_compute_has_assets' store=True
  • name Char
    required=True translate=True
Public methods (2)
  • get_assets(self)
    @api.multi
    Assets of the theme and all its dependencies
  • upstream_dependencies(self)
    @api.multi
    Returns the theme and all its dependencies

New fields (5)
  • auto Boolean
    default=False help='Created automatically from theme view' string='Auto-generated'
  • name Char
    help='External ID of the assets view that inherits from `website.assets_frontend` and adds the theme requirements.' name='Reference' required=True
  • theme_id Many2one → website.theme
    comodel_name='website.theme' ondelete='cascade' required=True string='Theme'
  • view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' help='View that will be enabled when this theme is used in any website, and disabled otherwise. Usually used to load assets.' string='Assets view'
  • view_priority Integer
    readonly=True related='view_id.priority' store=True
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/website
GIT
GIThttps://github.com/OCA/website.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/website/tree/10.0/website_multi_theme
VERSION
VERSION 1.4.0
CATEGORY
CATEGORYWebsite
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), IT-Projects LLC
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), IT-Projects LLC
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Jairo Llopis, Ivan Yelizariev, Dave Lasley, oca-travis, Rafael Blasco
WEBSITE
WEBSITEhttps://www.tecnativa.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - website
    - web
    - base
    - web_editor
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES lessc
sass
scss
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
assets_editor assets_editor ir.ui.view qweb Inherits website.assets_editor
assets_pattern Empty assets_frontend pattern ir.ui.view qweb Inherits website.assets_frontend
demo_page Multi website theme demo page ir.ui.view qweb New
layout_pattern Main layout ir.ui.view qweb Inherits website.layout
s_demo1 Demo Cat ir.ui.view qweb New
s_demo2 Demo Dog ir.ui.view qweb New
snippet_selection snippet_selection ir.ui.view qweb Inherits website.snippets
theme_demo_assets_frontend Demo multiwebsite theme ir.ui.view qweb Inherits website.assets_frontend
view_view_form_extend ir.ui.view xpath Inherits base.view_view_form
view_website_config_settings Add theme selector website.config.settings field Inherits website.view_website_config_settings
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals)
    @api.model
    Catch cases of creating customize_show views. Reload theme to make new customize_show view available right after new module installation. It's also needed for CI tests when another modules expects new item in "Customize menu". We cannot override ir.ui.view model to do it, because it's created before creating ir.model.data, which is essential for multi_theme_reload FIXME: themes are reloaded as much times as new module has views with customize_show

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • multitheme_copy_ids One2many → ir.ui.view
    help='Duplicates of this view' readonly=True string='Copies' args: 'ir.ui.view', 'origin_view_id'
  • origin_view_id Many2one → ir.ui.view
    help='View from where this one was copied for multi-website' readonly=True string='Copied from' args: 'ir.ui.view'
  • was_active Boolean
    help='Indicates if the view was originally active before converting the single website theme that owns it to multi website mode.' readonly=True
Public methods (1)
  • search(self, domain, offset=0, limit=None, order=None, count=False)

New fields (2)
  • multi_theme_id Many2one → website.theme
    comodel_name='website.theme' default=<expr> domain=[('has_assets', '=', True)] help='Multiwebsite-compatible theme for this website' string='Multiwebsite theme'
  • multi_theme_view_ids One2many → ir.ui.view
    comodel_name='ir.ui.view' domain=[('origin_view_id', '!=', False), '|', ('active', '=', True), ('active', '=', False)] help='Views generated by the multiwebsite theme just for this website' inverse_name='website_id' string='Multiwebsite views'
Public methods (2)
  • create(self, vals)
    @api.model
  • write(self, vals)

New fields (1)
  • multi_theme_id Many2one
    related='website_id.multi_theme_id'
Public methods (1)
  • multi_theme_reload(self)
    Update multiwebsite themes when loading a new wizard.

New fields (5)
  • asset_ids One2many → website.theme.asset
    comodel_name='website.theme.asset' help='Asset views that will be disabled by default and enabled only in websites that enable this theme in multiwebsite mode.' inverse_name='theme_id' string='Assets'
  • converted_theme_addon Char
    help='Name of the theme addon that is being converted from single to multi website mode.'
  • dependency_ids Many2many → website.theme
    help='If theme is splitted in different theme-modules, they should be in this list. "Default theme" should be here too in order to make some features (e.g. footer) work on each website independently' string='Sub-themes' args: 'website.theme', 'website_theme_dependency_rel', 'theme1', 'theme2'
  • has_assets Boolean
    compute='_compute_has_assets' store=True
  • name Char
    required=True translate=True
Public methods (2)
  • get_assets(self)
    @api.multi
    Assets of the theme and all its dependencies
  • upstream_dependencies(self)
    @api.multi
    Returns the theme and all its dependencies

New fields (5)
  • auto Boolean
    default=False help='Created automatically from theme view' string='Auto-generated'
  • name Char
    help='External ID of the assets view that inherits from `website.assets_frontend` and adds the theme requirements.' name='Reference' required=True
  • theme_id Many2one → website.theme
    comodel_name='website.theme' ondelete='cascade' required=True string='Theme'
  • view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' help='View that will be enabled when this theme is used in any website, and disabled otherwise. Usually used to load assets.' string='Assets view'
  • view_priority Integer
    readonly=True related='view_id.priority' store=True
Public methods (0)

No public methods.