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


As mentioned in odoo 13 external API documentation we can query like this:

https://www.odoo.com/documentation/13.0/webservices/odoo.html

models.execute_kw(db, uid, password,
    'res.partner', 'search',
    [[['is_company', '=', True]]])

how can I add another term to 'is_company = True' like' partner_id = 8 ' and  'and' them together?

อวตาร
ละทิ้ง

Hey i havent tried it yet but u let me know by using

models.execute_kw(db, uid, password,

'res.partner', 'search',

[[['is_company', '=', True],['partner_id','=',your_id]]])

คำตอบที่ดีที่สุด

By default AND operator is applied in the domain. If you want to apply OR condition, use "|" symbol.

Ex:

[['|', ['is_company', '=', True], ['name', '=', 'My Company']]]

# is_company=True or name='My Company'
อวตาร
ละทิ้ง
ผู้เขียน

It works thanks a lot

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 20
20017
0
ม.ค. 23
2260
1
ส.ค. 25
351
2
ก.ค. 25
2803
API xmlrpc - upload pdf bills to account แก้ไขแล้ว
3
ก.ค. 25
618