Community archivos de la lista de correo
Re: Record Rules depends on many2many fields?por
thanks a lot ludwik.. work..
On 24 June 2015 at 21:57, Ludwik Trammer <firstname.lastname@example.org> 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)]".
http://ludwiktrammer.github.io/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: crm.case.section)'team_ids': fields.many2many('crm.case.section', '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:[('section_id','child_of',[user.team_ids.id])][('section_id','in',[user.team_ids.id])]
[('section_id','=',user.team_ids.id)]Please share your valuable experiences..Best regards,Dion