[FIX] core: new record has one2many field with real records

Part-of: odoo/odoo#124612
This commit is contained in:
Raphael Collet
2023-06-13 12:49:23 +02:00
parent d30b5c0392
commit 00e86b1552
+1 -1
View File
@@ -4524,7 +4524,7 @@ class One2many(_RelationalMulti):
elif command[0] in (Command.CLEAR, Command.SET):
# assign the given lines to the last record only
cache.update(recs, self, itertools.repeat(()))
lines = comodel.browse(command[2] if command[0] == Command.SET else [])
lines = browse(command[2] if command[0] == Command.SET else [])
cache.set(recs[-1], self, lines._ids)