Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
14574 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mai. 24
2115
3
abr. 23
11576
9
dez. 23
23865
1
mai. 20
6327
1
mai. 19
2825