コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5294 ビュー


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
20018
0
1月 23
2260
1
8月 25
351
2
7月 25
2803
3
7月 25
618