diff options
| author | Adrian Torres <adt@odoo.com> | 2020-11-25 08:47:23 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2020-11-25 14:24:03 +0000 |
| commit | 76bf9dc94165c79be873a8864bfdb50a0a636084 (patch) | |
| tree | d2b51c6aa7b26c2e6349779b1b8ad169fb3d518e /addons/mail/static/src/models/thread/thread.js | |
| parent | c0e082ee1fba7cecc711f724974d79ed65bab29b (diff) | |
[FIX] core: allow writing to delegated m2o fields on records
Before this commit, it was impossible to write to a delegated m2o field
if the length of the recordset was greater than 1.
The reason was because the special case for delegated fields inside
fields.Many2one.convert_to_cache would check for `record.id` which is a
bit misleading, since record can be greater than one.
The solution is to check whether any of the records are real records
instead, as if all of the records are NewRecords, then the parent is a
NewRecord too.
Fixes #62069
closes odoo/odoo#62321
X-original-commit: fd211958a28d886626552ec976253f9f9267dacf
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread/thread.js')
0 files changed, 0 insertions, 0 deletions
