Skip to content
Snippets Groups Projects
Commit 930368c2 authored by Rémy Voet (ryv)'s avatar Rémy Voet (ryv) Committed by Raphael Collet
Browse files

[FIX] core: unexpected MissingError when prefetching record


This is a rare case where method _read() raises a MissingError instead
of just ignoring it.

The issue is triggered by several conditions on a model M:
 - at least one ir.rule on M with a domain using a column field on M;
 - one deleted record Y which is in the prefetch set of a record X;
 - one reads a non-column field on record X.

Fix method _read() to manage that case.  It adds an extra call to
exists() in that case, but adds no overhead in the general case.

closes odoo/odoo#107965

X-original-commit: 65a012c2
Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
parent 97be991d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment