Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5155 Visualizzazioni


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
Abbandona

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

Risposta migliore

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
Abbandona
Autore

It works thanks a lot

Post correlati Risposte Visualizzazioni Attività
0
mar 20
19847
0
gen 23
2172
0
lug 25
184
1
giu 25
1868
1
lug 25
852