Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5123 Lượt xem


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?

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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'
Ảnh đại diện
Huỷ bỏ
Tác giả

It works thanks a lot

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 20
19814
0
thg 1 23
2149
1
thg 6 25
1833
1
thg 7 25
822
1
thg 4 25
1510