summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authormreficent <miquel.raich@eficent.com>2018-04-26 18:50:30 +0000
committermreficent <miquel.raich@eficent.com>2019-04-26 13:54:20 +0000
commitc6d718f2118a00a37d6ce35b84239a4990c07935 (patch)
treefa4862883a6ca8dbd971bea7b038920baed03873 /odoo/fields.py
parent631abaf6892fd1bbc65d77b58d0ee03b3de47c4d (diff)
[FIX] In new records *2many, enable to handle multiple RPC inputs
closes odoo/odoo#24458 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 954d33ee683..4be470b31d1 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -2080,8 +2080,8 @@ class _RelationalMulti(_Relational):
elif isinstance(value, (list, tuple)):
# value is a list/tuple of commands, dicts or record ids
comodel = record.env[self.comodel_name]
- # determine the value ids; by convention empty on new records
- ids = OrderedSet(record[self.name].ids if record.id else ())
+ # determine the value ids
+ ids = OrderedSet(record[self.name]._ids)
# modify ids with the commands
for command in value:
if isinstance(command, (tuple, list)):