Skip to content
Snippets Groups Projects
Commit 6d5da2d2 authored by Raphael Collet's avatar Raphael Collet Committed by Xavier-Do
Browse files

[FIX] core: prefetching of context-dependent fields


Consider a context-dependent field, and successively access it on a
recordset with different contexts.  On the first context, the field is
correctly computed in batch.  After that, the field is always computed
one by one.

The bug is in the method that determines which records in a given set
have no value in cache.  On the first context, the cache is empty for
the field, so all records are returned.  After that, the method
considers that all records have a value in cache: they do, but for
another context key!  Simply using the context key when looking up the
cache fixes the issue.

closes odoo/odoo#52360

X-original-commit: 35d69589d9b43afe6c6fc9779458323f7180153e
Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
Co-authored-by: default avatarXavier-Do <xdo@odoo.com>
parent 1d0501d2
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment