Community mailing list archives

community@mail.odoo.com

how to create all records of a recordset in the database on one operation

by
e-acta, Brahim EL ALLIOUI
- 02/09/2016 07:12:50
Hello,

Are there a way to create all records of a recordset in the database, or convert recordset to vals for use in the method create(self, vals).

Ex:

for att in self.env.cr.dictfetchall():
att['object1_id'] = self.id
att['field1'] = 'value'
object_object=self.env['object.object'].new(att)
object_object_ids+=object_object
self.env['object.object'].create(eacta_daily_attendance_ids)


Thanks,

Brahim EL ALLIOUI

Skype : belallioui
Tel : +212535749410
Mobile : +212661940077