-
- Downloads
[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:Xavier Dollé (xdo) <xdo@odoo.com> Co-authored-by:
Xavier-Do <xdo@odoo.com>
Showing
- odoo/addons/test_performance/models/models.py 7 additions, 0 deletionsodoo/addons/test_performance/models/models.py
- odoo/addons/test_performance/tests/test_performance.py 18 additions, 0 deletionsodoo/addons/test_performance/tests/test_performance.py
- odoo/api.py 15 additions, 4 deletionsodoo/api.py
Loading
Please register or sign in to comment