Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5867 มุมมอง

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.

อวตาร
ละทิ้ง
ผู้เขียน

Excellent Sudhir Arya!! It works!! Thank you!!
คำตอบที่ดีที่สุด

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]]]


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
4894
1
ส.ค. 24
4973
1
พ.ย. 19
6774
1
มี.ค. 15
11589
1
มี.ค. 15
4948