diff --git a/trytond/trytond/model/modelstorage.py b/trytond/trytond/model/modelstorage.py index be7bcbd13c..f4c341ae0a 100644 --- a/trytond/trytond/model/modelstorage.py +++ b/trytond/trytond/model/modelstorage.py @@ -1968,9 +1968,13 @@ class ModelStorage(Model): without_check_access(): if to_create: news = cls.create([save_values[r] for r in to_create]) + new_ids = [] for record, new in zip(to_create, news): record._ids.remove(record.id) record._id = new.id + # Group all records that are alone + if not record._ids: + record._ids = new_ids record._ids.append(record.id) if to_write: cls.write(*sum(