How oca/web works
Repository Role and Entry Points
This is the OCA web repository for Odoo 18.0: a collection of independently installable addons that extend the Odoo web client, backend models, views, and selected HTTP endpoints. There is no single application entry point; Odoo discovers each addon through its manifest and package initializer, e.g. web_responsive/__manifest__.py, web_timeline/__manifest__.py, and web_pwa_customize/__init__.py.
Addon Loading and Extension Boundary
Each addon is an isolated deployment unit with its own manifest, Python package, browser assets, XML views, translations, and sometimes access rules. Odoo’s module loader is the primary composition boundary; installed addons patch or register behavior into standard Odoo services, models, fields, and view types. Examples: web_dark_mode/__manifest__.py, web_form_banner/__manifest__.py, web_widget_x2many_2d_matrix/__manifest__.py.
Browser Client Customizations
Most modules execute in the Odoo browser client as ES modules, patching existing controllers/renderers/models or registering UI components and field widgets. The primary flow is Odoo web-client state/action → addon JS patch/component → rendered XML/SCSS UI → ORM/RPC through Odoo’s existing client services. Representative high-impact implementations:
• Responsive shell, menus, chatter, search, and form behavior: web_responsive/static/src/components/, web_responsive/static/src/views/form/form_renderer.esm.js.
• Timeline custom view lifecycle: web_timeline/static/src/views/timeline/timeline_view.esm.js, web_timeline/static/src/views/timeline/timeline_model.esm.js.
• Pivot computed-measure UI/model extensions: web_pivot_computed_measure/static/src/pivot/pivot_controller.esm.js, web_pivot_computed_measure/static/src/pivot/pivot_model.esm.js.
• Search/filter controls: web_filter_header_button/static/src/search/search_model_patch.esm.js, web_time_range_menu_custom/static/src/js/search_model.esm.js.
Server-Side Persistence, Configuration, and Security
Python models extend Odoo ORM entities to persist per-user/company settings, define functional records, or alter server-side behavior. XML views expose those values in Odoo administration; access CSV/XML constrains custom model access. Key examples:
• User/company presentation settings: web_chatter_position/models/res_users.py, web_company_color/models/res_company.py, web_theme_classic/models/res_users_settings.py.
• Configurable business/UI rules: web_form_banner/models/web_form_banner_rule.py, web_quick_start_screen/models/quick_start_screen.py.
• Security-sensitive export restriction: web_disable_export_group/models/models.py, web_disable_export_group/security/groups.xml.
• Model/view metadata manipulation for field options: web_m2x_options_manager/models/ir_ui_view.py, web_m2x_options_manager/models/m2x_create_edit_option.py.
HTTP, Actions, and Session Boundaries
A smaller server-side layer intercepts HTTP requests, exposes endpoints, or extends Odoo action execution. These are integration boundaries between browser requests, authentication/session state, Odoo actions, and response generation:
• Dynamic Excel export behavior: web_excel_export_dynamic_expand/controllers/excel_export.py.
• PWA manifest endpoint and configuration: web_pwa_customize/controllers/webmanifest.py, web_pwa_customize/models/res_config_settings.py.
• Inactivity-driven logout flow: web_session_auto_close/controllers/main.py, web_session_auto_close/static/src/js/session_auto_close.esm.js.
• Multi-action and action-window messaging extensions: web_ir_actions_act_multi/models/ir_actions.py, web_ir_actions_act_window_message/models/ir_actions.py.
Visual Assets and Third-Party Client Libraries
SCSS and XML templates are bundled into Odoo assets alongside JS, making them runtime client dependencies rather than a separately deployed frontend. The repository vendors visualization/search libraries where needed: web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js, web_widget_mpld3_chart/static/src/lib/d3/d3.v5.js, web_responsive/static/src/lib/fuse/fuse.basic.js. The material runtime stack is Python/Odoo on the server and JavaScript, XML templates, and SCSS in the browser; data storage and RPC are provided by the hosting Odoo instance.
Main entry points: __manifest__.py Addon manifests · web_form_banner_rule.py ORM model extensions · timeline_view.esm.js Timeline view · webmanifest.py HTTP controllers
Components 16
Addon Composition
Independently installable Odoo extensions.
- Odoo module loader · Discovers manifests and installs addon packages.
- Addon manifests · Declare dependencies and browser asset bundles.
web_responsive/__manifest__.py - Addon packages · Package initializers expose installable addons.
web_pwa_customize/__init__.py
Browser Extensions
Client patches, views, and bundled UI assets.
- Odoo web client · Provides actions, state, RPC, and extension registries.
- Responsive UI patches · Extends shell, menus, chatter, search, and forms.
- Timeline view · Implements timeline view lifecycle and state.
web_timeline/static/src/views/timeline/timeline_view.esm.js - Pivot computed measures · Extends pivot controller and model behavior.
web_pivot_computed_measure/static/src/pivot/pivot_controller.esm.js - Search controls · Adds filter-header and time-range search behavior.
web_filter_header_button/static/src/search/search_model_patch.esm.js - XML and SCSS assets · Templates and styles bundled with client modules.
- Bundled client libraries · Visualization and search dependencies shipped in addons.
web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js
Server Extensions
ORM, security, actions, and HTTP integration.
- ORM model extensions · Persist settings, rules, and metadata extensions.
web_form_banner/models/web_form_banner_rule.py - Administration views · Expose addon configuration and records in Odoo.
- Export security rules · Restricts export behavior through Odoo groups.
web_disable_export_group/security/groups.xml - Action extensions · Extends multi-actions and action-window messaging.
web_ir_actions_act_multi/models/ir_actions.py - HTTP controllers · Handles exports, PWA manifest, and session flows.
web_pwa_customize/controllers/webmanifest.py - Odoo ORM, RPC and storage · Hosting instance supplies persistence and browser-server RPC.
Connections 22
- Odoo module loader → Addon manifests: reads
- Odoo module loader → Addon packages: loads
- Addon manifests → Responsive UI patches: bundles
- Addon manifests → Timeline view: bundles
- Addon manifests → Pivot computed measures: bundles
- Addon manifests → Search controls: bundles
- Addon manifests → XML and SCSS assets: bundles
- Addon manifests → ORM model extensions: installs
- Addon manifests → HTTP controllers: installs
- Odoo web client → Responsive UI patches: runs patches
- Odoo web client → Timeline view: registers view
- Odoo web client → Pivot computed measures: runs extension
- Odoo web client → Search controls: runs patch
- Responsive UI patches → XML and SCSS assets: renders
- Timeline view → Bundled client libraries: uses
- Odoo web client → Odoo ORM, RPC and storage: RPC
- ORM model extensions → Odoo ORM, RPC and storage: extends
- Administration views → ORM model extensions: configures
- Export security rules → ORM model extensions: constrains
- Action extensions → Odoo ORM, RPC and storage: extends actions
- HTTP controllers → Odoo ORM, RPC and storage: uses session and responses
- Odoo web client → HTTP controllers: HTTP requests