diff options
| author | Raphael Collet <rco@odoo.com> | 2019-09-23 13:41:18 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-09-30 15:42:36 +0000 |
| commit | 4b1cb41cf7a3f936a1e6d00a2bb6a6a29e82d711 (patch) | |
| tree | c222eb33232a664293d7363cd42d50b87b80341f /addons/test_mail/tests | |
| parent | 333f1087cf50efa4e053e5d9fef0b80e421967f1 (diff) | |
[FIX] models, fields: cache consistency for one2many fields
Issue: after many2one updates, the cache of the corresponding one2many
fields was inconsistent when the latter depends on `active_test`. One
of the values in cache was updated, while the other was left intact.
We simplify the cache by not making the field depend on context: the
cache value contains all the records in the relation (corresponding to
`active_test=False`). The value of the field is automatically filtered
by the `active` field when the value is accessed.
This makes it easier to maintain the cache value, guarantees its
consistency, and avoids queries to read the one2many field with
`active_test=False`, after having set it with `active_test=True`.
Diffstat (limited to 'addons/test_mail/tests')
0 files changed, 0 insertions, 0 deletions
