跳至内容
菜单
此问题已终结
1 回复
14307 查看

hello guys, i want to ask a question..

so im using odoo11 and i have 3 groups:

group_a, group_b, group_c


and i want to check the current login user has at least one of them in python? how to do it?

im aware there are self.user_has_groups('group_a) but can i check it more than 1 group?


thanks


形象
丢弃
最佳答案

Hello rehan,


You can check by this way:


if self.env.user.has_group ('group_a') and self.env.user.has_group ('group_b') and self.env.user.has_group ('group_c'):

Your condition

Regards,




Email:     odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

形象
丢弃
相关帖文 回复 查看 活动
2
5月 24
1942
3
4月 23
11343
9
12月 23
23674
1
5月 20
6146
1
5月 19
2696