Skip to content
Snippets Groups Projects
Commit cfb942ab authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] core: avoid access error when flushing


This patch guarantees that computed fields with `compute_sudo=True` do
not cause access errors when fetched from database.

This fixes a non-deterministic access error upon `commit`, where fields
are recomputed and flushed with some random environment.  The method
`recompute` performs its duty by accessing the fields to recompute.  The
compute method of a field is called but does not assign it.  As the
field is not in cache, its value is read from database.  However, as the
latter is not done in superuser mode, it may cause some access error.

closes odoo/odoo#61820

Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
parent a32bdf25
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