Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5957 Visualizzazioni

Hello.

Now in the search_read function I have to pass field by field to get the item.

foreach($partnerlist as $partner){

     $user = $odoo->search_read('res.partner', [[['id', '=', $partner->id]]], ['fields' => $fields, 'limit' => 1]);

}

But this produce a slow process if I have to get a lot of partners.

So, if you see a SQL query you can do the 'in' clausule for multiples ids. So, exists something like this in XMLRPC?

If I could do something like [[['id', 'in', $arrayids]]] must be great.

Thanks.

Avatar
Abbandona
Autore

Excellent Sudhir Arya!! It works!! Thank you!!
Risposta migliore

Hi Ferran,

Yes, you can use "in" operator in the domain condition to fetch the data of all the partner IDs.

[[['id', 'in', $array_partner_ids]]]


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mar 15
4983
1
ago 24
5098
1
nov 19
6874
1
mar 15
11725
1
mar 15
5045