If you are new to Odoo development, you might execute multiple queries to write or create multiple records. In this recipe, we will look at how to create and write records in batches.
Creating or writing multiple records
How to do it...
Odoo v12 added support for creating records in batches. If you are creating a single record, simply pass a dictionary with the field values. To create records in a batch, you just need to pass a list of these dictionaries instead of a single dictionary. The following example creates three book records in a single create call:
vals = [{
'name': "Book1",
'date_release': '2018/12/12',
}, {
'name': "Book2",
'date_release...