Skip to content
Snippets Groups Projects
Commit c44ffdfb authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] core: ignore id field in o2ms


Followup to odoo/odoo#43117 (backporting from something which breaks
in 12.3): if the o2m somehow has an id field, this field should be
ignored when extracting values to save, for the purpose of both
actually saving and extracting values for e.g. default_get.

closes odoo/odoo#43204

Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 54c1c02d
No related branches found
No related tags found
No related merge requests found
......@@ -1488,7 +1488,7 @@ class Form(object):
context['•parent•'] = self._values
vs = {
k: v for k, v in items
if all_fields or nodes[k].get('force_save') or not self._get_modifier(k, 'readonly', modmap=modifiers, vals=context)
if (all_fields and k != 'id') or nodes[k].get('force_save') or not self._get_modifier(k, 'readonly', modmap=modifiers, vals=context)
}
v.append((c, rid, vs))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment