تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
5860 أدوات العرض

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


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
4894
1
أغسطس 24
4972
1
نوفمبر 19
6770
1
مارس 15
11587
1
مارس 15
4945