Irfan Ullah
Irfan Ullah

Reputation: 69

Odoo database multiple condition AND and OR Android

Hello every one i am using Odoo Database with Xmlrpc My current code is

 asList(asList(asList("state","=", "assigned")//here i need AND condetion
,asList(asList("groups_id","in",groupsId),"OR",asList("user_id","=",userId)))),

In above code here i want one AND condition with internal list and OR condition where i have put "OR". Please show me a correct way

Upvotes: 1

Views: 184

Answers (1)

Charif DZ
Charif DZ

Reputation: 14721

Try this:

 asList(
    asList(
        "&",
        asList("state","=", "assigned"),
        "|",
        asList(asList("groups_id","in",groupsId),
        sList("user_id","=",userId))
    )
 ),

Upvotes: 1

Related Questions