跳至内容
菜单
此问题已终结
2 回复
5227 查看


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

相关帖文 回复 查看 活动
0
3月 20
19923
0
1月 23
2221
2
7月 25
2678
3
7月 25
501
1
7月 25
198