Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
14447 Zobrazení

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


Avatar
Zrušit
Nejlepší odpověď

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

   

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 24
2011
3
dub 23
11482
9
pro 23
23762
1
kvě 20
6220
1
kvě 19
2739