# oca/web architecture

> Architecture diagram of the GitHub repository oca/web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oca/web
- Repository: https://github.com/oca/web

## Overview

#### 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: [`web_responsive/__manifest__.py`](https://github.com/oca/web/blob/18.0/web_responsive/__manifest__.py) (Addon manifests), [`web_form_banner/models/web_form_banner_rule.py`](https://github.com/oca/web/blob/18.0/web_form_banner/models/web_form_banner_rule.py) (ORM model extensions), [`web_timeline/static/src/views/timeline/timeline_view.esm.js`](https://github.com/oca/web/blob/18.0/web_timeline/static/src/views/timeline/timeline_view.esm.js) (Timeline view), [`web_pwa_customize/controllers/webmanifest.py`](https://github.com/oca/web/blob/18.0/web_pwa_customize/controllers/webmanifest.py) (HTTP controllers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_addons["Addon Composition"]
  node_odoo_loader{{"Odoo module loader<br/>platform composition"}}
  node_addon_manifests["Addon manifests<br/>module metadata<br/>[__manifest__.py]"]
  node_addon_packages["Addon packages<br/>Python package<br/>[__init__.py]"]
end

subgraph group_browser["Browser Extensions"]
  node_web_client{{"Odoo web client<br/>browser runtime"}}
  node_responsive_ui["Responsive UI patches<br/>client components"]
  node_timeline_view["Timeline view<br/>custom view"]
  node_pivot_measures["Pivot computed measures<br/>pivot extension"]
  node_search_extensions["Search controls<br/>search patch"]
  node_ui_assets["XML and SCSS assets<br/>asset bundle"]
  node_client_libraries["Bundled client libraries<br/>vendored JavaScript"]
end

subgraph group_server["Server Extensions"]
  node_orm_models["ORM model extensions<br/>Python models"]
  node_admin_views["Administration views<br/>XML views"]
  node_security_rules["Export security rules<br/>access control<br/>[groups.xml]"]
  node_action_extensions["Action extensions<br/>server actions<br/>[ir_actions.py]"]
  node_http_controllers["HTTP controllers<br/>request handlers<br/>[webmanifest.py]"]
  node_odoo_services[("Odoo ORM, RPC and storage<br/>hosting platform")]
end

node_odoo_loader -->|"reads"| node_addon_manifests
node_odoo_loader -->|"loads"| node_addon_packages
node_addon_manifests -->|"bundles"| node_responsive_ui
node_addon_manifests -->|"bundles"| node_timeline_view
node_addon_manifests -->|"bundles"| node_pivot_measures
node_addon_manifests -->|"bundles"| node_search_extensions
node_addon_manifests -->|"bundles"| node_ui_assets
node_addon_manifests -->|"installs"| node_orm_models
node_addon_manifests -->|"installs"| node_http_controllers
node_web_client -->|"runs patches"| node_responsive_ui
node_web_client -->|"registers view"| node_timeline_view
node_web_client -->|"runs extension"| node_pivot_measures
node_web_client -->|"runs patch"| node_search_extensions
node_responsive_ui -->|"renders"| node_ui_assets
node_timeline_view -->|"uses"| node_client_libraries
node_web_client -->|"RPC"| node_odoo_services
node_orm_models -->|"extends"| node_odoo_services
node_admin_views -->|"configures"| node_orm_models
node_security_rules -->|"constrains"| node_orm_models
node_action_extensions -->|"extends actions"| node_odoo_services
node_http_controllers -->|"uses session and responses"| node_odoo_services
node_web_client -->|"HTTP requests"| node_http_controllers

click node_addon_manifests "https://github.com/oca/web/blob/18.0/web_responsive/__manifest__.py"
click node_addon_packages "https://github.com/oca/web/blob/18.0/web_pwa_customize/__init__.py"
click node_timeline_view "https://github.com/oca/web/blob/18.0/web_timeline/static/src/views/timeline/timeline_view.esm.js"
click node_pivot_measures "https://github.com/oca/web/blob/18.0/web_pivot_computed_measure/static/src/pivot/pivot_controller.esm.js"
click node_search_extensions "https://github.com/oca/web/blob/18.0/web_filter_header_button/static/src/search/search_model_patch.esm.js"
click node_client_libraries "https://github.com/oca/web/blob/18.0/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js"
click node_orm_models "https://github.com/oca/web/blob/18.0/web_form_banner/models/web_form_banner_rule.py"
click node_security_rules "https://github.com/oca/web/blob/18.0/web_disable_export_group/security/groups.xml"
click node_action_extensions "https://github.com/oca/web/blob/18.0/web_ir_actions_act_multi/models/ir_actions.py"
click node_http_controllers "https://github.com/oca/web/blob/18.0/web_pwa_customize/controllers/webmanifest.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_odoo_loader,node_addon_manifests,node_addon_packages toneBlue
class node_web_client,node_responsive_ui,node_timeline_view,node_pivot_measures,node_search_extensions,node_ui_assets,node_client_libraries toneAmber
class node_orm_models,node_admin_views,node_security_rules,node_action_extensions,node_http_controllers,node_odoo_services toneMint
```

## Components

### Addon Composition

Independently installable Odoo extensions.

- **Odoo module loader**: platform composition · Discovers manifests and installs addon packages.
- [Addon manifests](https://github.com/oca/web/blob/18.0/web_responsive/__manifest__.py): module metadata · Declare dependencies and browser asset bundles. · `web_responsive/__manifest__.py`
- [Addon packages](https://github.com/oca/web/blob/18.0/web_pwa_customize/__init__.py): Python package · Package initializers expose installable addons. · `web_pwa_customize/__init__.py`

### Browser Extensions

Client patches, views, and bundled UI assets.

- **Odoo web client**: browser runtime · Provides actions, state, RPC, and extension registries.
- **Responsive UI patches**: client components · Extends shell, menus, chatter, search, and forms.
- [Timeline view](https://github.com/oca/web/blob/18.0/web_timeline/static/src/views/timeline/timeline_view.esm.js): custom view · Implements timeline view lifecycle and state. · `web_timeline/static/src/views/timeline/timeline_view.esm.js`
- [Pivot computed measures](https://github.com/oca/web/blob/18.0/web_pivot_computed_measure/static/src/pivot/pivot_controller.esm.js): pivot extension · Extends pivot controller and model behavior. · `web_pivot_computed_measure/static/src/pivot/pivot_controller.esm.js`
- [Search controls](https://github.com/oca/web/blob/18.0/web_filter_header_button/static/src/search/search_model_patch.esm.js): search patch · Adds filter-header and time-range search behavior. · `web_filter_header_button/static/src/search/search_model_patch.esm.js`
- **XML and SCSS assets**: asset bundle · Templates and styles bundled with client modules.
- [Bundled client libraries](https://github.com/oca/web/blob/18.0/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js): vendored JavaScript · 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](https://github.com/oca/web/blob/18.0/web_form_banner/models/web_form_banner_rule.py): Python models · Persist settings, rules, and metadata extensions. · `web_form_banner/models/web_form_banner_rule.py`
- **Administration views**: XML views · Expose addon configuration and records in Odoo.
- [Export security rules](https://github.com/oca/web/blob/18.0/web_disable_export_group/security/groups.xml): access control · Restricts export behavior through Odoo groups. · `web_disable_export_group/security/groups.xml`
- [Action extensions](https://github.com/oca/web/blob/18.0/web_ir_actions_act_multi/models/ir_actions.py): server actions · Extends multi-actions and action-window messaging. · `web_ir_actions_act_multi/models/ir_actions.py`
- [HTTP controllers](https://github.com/oca/web/blob/18.0/web_pwa_customize/controllers/webmanifest.py): request handlers · Handles exports, PWA manifest, and session flows. · `web_pwa_customize/controllers/webmanifest.py`
- **Odoo ORM, RPC and storage**: hosting platform · Hosting instance supplies persistence and browser-server RPC.

## Connections

- 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
