diff options
| author | Adrian Torres <adt@odoo.com> | 2019-10-11 07:19:43 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-15 14:33:07 +0000 |
| commit | 73b18b30b5fcad43a08407d4cfa13b6c55c58f4c (patch) | |
| tree | 5862d2fe1bdad4a07a497cdbb8738fe08ba7b36f /addons/web/static/src/js/fields/basic_fields.js | |
| parent | b2a403efc7796d77b42162483e6f1030de96153f (diff) | |
[FIX] base: don't crash during CRUD if record does not exist
- Let a model M define a Many2oneReference field F1.
- Let a model N define a One2many field F2 whose inverse is M->F1
- Define a computed field N->F3 that depends on N->F2
If, for whatever reason, a recordset of M contains records that have
been unlinked already and we try to unlink them again, the system will
crash with a MissingException error.
This happened because, while most _modified_trigger cases cover the case
of a MissingException (i.e. record not in cache), the case for a
Many2oneReference didn't.
This is fixed by simply ignoring these "stale" records in the
_modified_triggers section for Many2oneReference fields.
closes odoo/odoo#38816
X-original-commit: f3b05032f0576befda4dca870718afd429c21b0f
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Co-authored-by: mreficent <miquel.raich@eficent.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
