Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1400 Weergaven

Is it possible to create multiple records(for example contacts(res.partner)) in one single api call?

I have to sync new data from existing apps and the initial import needs to create thousands of new records per app. Is there a way that I could send all the data in one call?

i.e.: 

$pId = $this->models->execute_kw($this->db, $this->uid, $this->password, 'res.partner', 'create', [
[
'name' => $this->payload['payload']['data']['ContactName'],
'email' => $this->payload['payload']['data']['ContactEmail'],
'type' => $this->payload['payload']['data']['ContactType'],
'parent_id' => $parent_id,
'parent_name' => $this->payload['payload']['data']['CompanyName'],
'company_type' => 'person',
'company_id' => 2,
'function' => $this->payload['payload']['data']['LinkRole'],
'comment' => 'This record was automatically created via the webhook',
], [record_2], [record_3], [etc.],
]
);
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 25
2381
1
aug. 25
455
1
aug. 25
681
2
jul. 25
3192
3
jul. 25
819