Files
odoo_source/odoo
Raphael Collet 5fc9b8c44a [FIX] core: partial unlink in recordset
The following loop crashes on the second iteration:

    for record in records:
	record.display_name     # access non-stored computed field
        record.unlink()         # delete record

The cache has been invalidated by `unlink` on the first iteration, so
the field is computed.  The computation is done on the whole recordset,
which fails with a `MissingError` because of the first record.  The fix
is to retry the recomputation on the single record in this case.

closes odoo/odoo#50910

X-original-commit: 7f33ebf528b1415452ce549e3329c3fe89be0ad8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-08 11:33:38 +00:00
..
…