Skip to Content
Menu
This question has been flagged
1 Reply
10663 Views

Hello,

As new changes held in new openerp. res.partner represent res.users at some place.

Now when I want to set domain for search that partner_ids have partner_id ,how can I?

Like I have partner_ids and want to check that , these partner_ids have partner_id or not ?

[('partner_ids','in', partner_id)] = not working.

Avatar
Discard
Best Answer

When we have a relation one2many we use this :

[('partner_ids','in', [partner_id])]
Avatar
Discard
Author

When we have in search view then ?

Can you specify the full context, because it's so diffucult to understand your needs, In search view you have to use the same domain on field,

Author

['|',('user_id','=',uid),('partner_ids',?,'partner_id')]

We use this : [('partner_ids','in', [partner_id])] try it. and it means : return users where the partner_id in partner_ids

there is an example on task rule : ['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','in', [user.id]),('project_id.user_id','=',user.id)] so please mark this answered

Author

['|',('user_id','=',uid),('partner_ids','in',[partner_id])], this seem ok, but not working well, also instead of in, I try child_of, even together no working well, each one alone works

If you ask about the operator between partner_id and partner_ids so the syntax is : * [('partner_ids','in', [partner_id])] * else if you ask about a particular case, so you have to explain all the context, the error message, fields instead, ....good luck