Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to give domain ['partner_ids','operator', partner_id]

By
test
on 3/4/13, 5:25 AM 3,122 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.

0
Yug Faa
On 3/4/13, 5:50 AM

When we have a relation one2many we use this :

[('partner_ids','in', [partner_id])]

When we have in search view then ?

test
on 3/4/13, 5:56 AM

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,

Yug Faa
on 3/4/13, 6:00 AM

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

test
on 3/4/13, 7:08 AM

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

Yug Faa
on 3/4/13, 7:11 AM

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

Yug Faa
on 3/4/13, 7:13 AM

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

test
on 3/4/13, 7:15 AM

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

Yug Faa
on 3/4/13, 7:47 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/4/13, 5:25 AM
Seen: 3122 times
Last updated: 3/16/15, 8:10 AM