Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5287 Tampilan


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?

Avatar
Buang

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

Jawaban Terbai

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'
Avatar
Buang
Penulis

It works thanks a lot

Post Terkait Replies Tampilan Aktivitas
0
Mar 20
20007
0
Jan 23
2252
1
Agu 25
342
2
Jul 25
2791
3
Jul 25
604