Community mailing list archives

Re: Record Rules depends on many2many fields?

Dion Martin
- 06/24/2015 23:57:17
thanks a lot ludwik.. work..

On 24 June 2015 at 21:57, Ludwik Trammer <> wrote:
I think [('section_id', 'in', user.team_ids.ids)] should work for you. ".ids" returns a list of all id numbers in a queryset.

You could also go the other way and write something similar to "[('section_id.member_ids', '=', uid)]".

Ludwik Trammer

On Wed, Jun 24, 2015 at 9:03 AM Dion Martin <> wrote:
Dear Community,

We are setting up record rules for one of our client. Please give me some advice if you have done same case below:

Sales manager manages more than one sales team. Thus, he should be able to see all Quotations/Sale Orders owned by salesman under his team. We've added new many2many fields on res.users (relation object:
'team_ids': fields.many2many('', 'sale_member_rel', 'member_id', 'section_id', 'Teams')

So, what is the rule that I have to set on Domain? We've tried these domains with no luck:

Please share your valuable experiences..

Best regards,

Post to:

Post to: