Rémy Voet (ryv)
authored
The field prefetching mechanism was poorly customizable. Before this,
we could only tell if a field was prefetched with other fields or not at
all. We have no way to inform the framework, like: "When I need data of
that field, prefetch these other fields, which are likely be used in the
same transaction".
From now on, the `prefetch` attribute is used as a grouping key for
prefetching fields. When a field is fetched, all the fields with the
same value for `prefetch` are taken for prefetching.
For example, consider a small set of fields that are rarely used, except
for one flow A using them. You want to prefetch those fields only in
the flow A, and you want to fetch them in a single query. With the new
feature, simply set `prefetch=A` for some string `A` on those fields,
and they will be grouped for prefetching.
closes odoo/odoo#85220
Signed-off-by:
Rémy Voet <ryv@odoo.com>
Name | Last commit | Last update |
---|---|---|
.. | ||
controllers | ||
data | ||
i18n | ||
models | ||
report | ||
security | ||
static | ||
tests | ||
views | ||
__init__.py | ||
__manifest__.py |