Repository
OCA/website · module folder · Try on Runboat
Module version
1.6.1
Category
Website
Folder size
1.45 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://www.tecnativa.com
Last tracking update
2026-08-07 07:24:58
Authors
Odoo Community Association (OCA), Onestein, Tecnativa, IT-Projects LLC
Maintainers
Odoo Community Association (OCA), Onestein, Tecnativa, IT-Projects LLC
Committers
Pedro M. Baeza, GitHub, Jairo Llopis, Ivan Yelizariev, Weblate, OCA Transbot, oca-travis
Odoo dependencies
Python dependencies
None
System dependencies
lessc, sass, scss
Required by
None
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 form Inherits base.view_view_form
view_website_config_settings Add theme selector res.config.settings form Inherits website.res_config_settings_view_form
view_website_form website form Inherits website.view_website_form
website_menu_search website_menu_search website.menu search New
website_pages_tree_view website.page tree Inherits website.website_pages_tree_view
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
(inherited route override) WebsiteMultiTheme.get_switchable_related_views inherited http ALL
(inherited route override) WebsiteMultiTheme.theme_customize_get inherited http ALL
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.

Loading…