コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
14608 ビュー

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
2137
3
4月 23
11608
9
12月 23
23892
1
5月 20
6349
1
5月 19
2866