Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
13799 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 24
1624
3
Apr 23
11032
9
Des 23
23299
1
Mei 20
5860
1
Mei 19
2506