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

I have a security group, and I want to apply a raise error to a button to cancel payments through a group (boolean), if the group is not activated and they try to cancel a payment, a raise error will appear where it specifies that it cannot cancel payments if you do not have access permissions.
Is this possible?
odoo 10 community, thanks!


アバター
破棄
最善の回答

Hi,

You can create a new security group and assign this user group to the corresponding button. Once the group is assigned to the button, the button will be visible only for the users in the specified group.

by adding groups="external_of_group" to the button directly or via inheritance will do the above.


If you don't need this and button has to be visible always and has to raise warning, you can add below code to the first part of the button.

if not self.env.user.has_group('group_external_id'):
raise AccessError(_("Do not have access"))


Thanks & Regards

Walnut Software Solutions

アバター
破棄
著作者

Thanks!

関連投稿 返信 ビュー 活動
0
4月 21
3676
1
3月 15
4741
4
8月 22
12306
0
8月 20
3077
3
6月 17
8139