Files
odoo_source/odoo
Rémy Voet (ryv) e3177646b6 [FIX] core: fix Field._update() method to take in account archived record
In e0297bd, we fixed the inverse field values of the new record during
the onchange. But we actually filter out inactive records by doing
record[self.name] in _update(). And since the XtoMany field cache
values should always contain inactive records, we need to add
with_context(active_test=False) on records.
Also remove the useless 'if value', value is always truly because it
is always a record.

Note that this solves a performance issue in our production, because
in order to filter out inactive records, we need to fetch the active
field next to every prefechable field.

closes odoo/odoo#148675

Signed-off-by: Raphael Collet <rco@odoo.com>
2024-01-10 08:51:01 +00:00
..
…
…
2023-10-26 19:39:28 +00:00