Website Multi Theme
website_multi_theme · OCA/website
Health
42/100
poor
-
Security25/25No findings
-
Activity0/25Last human commit 91 months ago
-
Required by5/250 modules depend on it
-
Maturity12/25In 2 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 3 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
1.45 MB
Module directory on disk
Code analysis
5 migration notes
7 models
14 views
2 HTTP endpoints
Migration considerations
IrUiView— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourceWebsite— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (2 methods) migration-api-multi-one · sourceWebsiteTheme— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. (2 occurrences in this file) migration-sql-constraints · sourceWebsiteTheme— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (3 methods) migration-api-multi-one · sourceview_view_form_extend— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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…