Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
10657 Vistas

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
Descartar
Mejor respuesta

When we have a relation one2many we use this :

[('partner_ids','in', [partner_id])]
Avatar
Descartar
Autor

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,

Autor

['|',('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

Autor

['|',('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