Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
14690 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Mai 24
2186
3
Apr. 23
11666
9
Dez. 23
23970
1
Mai 20
6408
1
Mai 19
2914