تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
5281 أدوات العرض


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
مارس 20
19985
0
يناير 23
2247
1
أغسطس 25
324
2
يوليو 25
2781
3
يوليو 25
582