Thanks Sir Sergi. I'll try it later and update this trend asap.
Best Regards... //elite On Saturday, October 8, 2016 at 9:43:20 PM UTC+8, Sergi Almacellas Abellana wrote: > > El 08/10/16 a les 12:07, Ryan ha escrit: > > Thanks Sir Cedric, > > > > Just a newbie here, just a month ago... > > > > Can you please show me the code for creating a query to check the user's > > id to get his group. > > does the user group can be found on 'res_group'? or res_user-res_group? > You have to browse the user with the id from the context of transaction > user and then read it's group properties. Something like (sorry but > writting from memory): > > pool = Pool() > User = pool.get('res.user') > user = User(Transaction().context['user'] > user.groups # This is a tuple of res.group instances for each group of > the user. > > Hope it helps. > > -- > Sergi Almacellas Abellana > www.koolpi.com > Twitter: @pokoli_srk > -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/70950423-c5a5-4b35-a8a7-d77448d5425f%40googlegroups.com.