TIP: You can type at any time to perform a new search.
Website Multi Theme
website_multi_theme · OCA/website
- 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
Code Analysis ⓘ
Views touched (14)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
| (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.modelCatch 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_idsOne2many → ir.ui.viewhelp='Duplicates of this view'readonly=Truestring='Copies' args: 'ir.ui.view', 'origin_view_id' -
origin_view_idMany2one → ir.ui.viewhelp='View from where this one was copied for multi-website'readonly=Truestring='Copied from' args: 'ir.ui.view' -
was_activeBooleanhelp='Indicates if the view was originally active before converting the single website theme that owns it to multi website mode.'readonly=True
-
get_related_views(self, key, bundles=False)@api.modelThis 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_idMany2onerelated='website_id.multi_theme_id'
-
multi_theme_reload(self)Update multiwebsite themes when loading a new wizard.
New fields (3)
-
base_urlChar -
multi_theme_idMany2one → website.themecomodel_name='website.theme'default=<expr>domain=[('has_assets', '=', True)]help='Multiwebsite-compatible theme for this website'string='Multiwebsite theme' -
multi_theme_view_idsOne2many → ir.ui.viewcomodel_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'
-
create(self, vals)@api.model -
write(self, vals)
New fields (5)
-
asset_idsOne2many → website.theme.assetcomodel_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_addonCharhelp='Name of the theme addon that is being converted from single to multi website mode.' -
dependency_idsMany2many → website.themehelp='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_assetsBooleancompute='_compute_has_assets'store=True -
nameCharrequired=Truetranslate=True
-
get_assets(self)@api.multiAssets of the theme and all its dependencies -
upstream_dependencies(self)@api.multiReturns the theme and all its dependencies
New fields (5)
-
autoBooleandefault=Falsehelp='Created automatically from theme view'string='Auto-generated' -
nameCharhelp='External ID of the assets view that inherits from `website.assets_frontend` and adds the theme requirements.'name='Reference'required=True -
theme_idMany2one → website.themecomodel_name='website.theme'ondelete='cascade'required=Truestring='Theme' -
view_idMany2one → ir.ui.viewcomodel_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_priorityIntegerreadonly=Truerelated='view_id.priority'store=True
No public methods.
Loading…