odoo/o-spreadsheet#8845
Created by BI, Pierre Rousseau (pro)
- label
- odoo:master-owl3-model-plugin-pro
- head
- 4c53575d70a05f19e5d37a75ea50e9d2e32480b3
| odoo/o-spreadsheet | |
|---|---|
| master | #8845 missing r+ |
[REF] components: introduce owl plugin for model
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.