Skip to content

[REF] components: introduce owl plugin for model#8845

Open
pro-odoo wants to merge 1 commit into
masterfrom
master-owl3-model-plugin-pro
Open

[REF] components: introduce owl plugin for model#8845
pro-odoo wants to merge 1 commit into
masterfrom
master-owl3-model-plugin-pro

Conversation

@pro-odoo
Copy link
Copy Markdown
Collaborator

@pro-odoo pro-odoo commented Jun 4, 2026

This commit introduces a ModelPlugin (Owl plugin) provided once by the
root Spreadsheet component to all its children. Components access the
model with the useModel() hook, which returns a getter that subscribes
the caller to a signal bumped on every model update event —
so render invalidation stays scoped to components that actually read it.

Note that the render is not yet fined-grained as we still use a render(true). This
will be removed in the future.

The consequence is that the model is not anymore in the env (the env will
be removed in the future as well), so all actions of registries now takes the
model in addition to the env.

Task: 6280733

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented Jun 4, 2026

Pull request status dashboard

@pro-odoo pro-odoo force-pushed the master-owl3-model-plugin-pro branch 5 times, most recently from 0a834f7 to cac4800 Compare June 5, 2026 12:31
@pro-odoo pro-odoo changed the title Master owl3 model plugin pro [REF] components: introduce owl plugin for model Jun 5, 2026
This commit introduces a ModelPlugin (Owl plugin) provided once by the
root Spreadsheet component to all its children. Components access the
model with the useModel() hook, which returns a getter that subscribes
the caller to a signal bumped on every model update event —
so render invalidation stays scoped to components that actually read it.

Note that the render is not yet fined-grained as we still use a render(true). This
will be removed in the future.

The consequence is that the model is not anymore in the env (the env will
be removed in the future as well), so all actions of registries now takes the
model in addition to the env.

Task: 6280733
@pro-odoo pro-odoo force-pushed the master-owl3-model-plugin-pro branch from cac4800 to 4c53575 Compare June 5, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants