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

I want to prevent a user/group from editing a Purchase Order based on whether the partner reference field is blank or not. I tried to create a non global record rule with the following domain rule:

[('partner_ref', '=', False)]

applied to create, write and delete. As expected, the user can't create, delete or change a purchase order with a non blank partner reference. But, if the user create a record with a blank partner reference, save it, and then edit, he can save it with a non blank field, which is not what I want. How can I prevent that?

アバター
破棄

Set the permission for particular user or group in ir.model.access.csv under security.

著作者

They already have all model access permissions, in addition to those I want to limit based on a specific field value, hence the use of Record Rules.

最善の回答

Hello,

You can, by view inheritance, hide the partner_ref field for that group, it should work.

アバター
破棄
著作者

The field should be visible to the user, but read-only.

関連投稿 返信 ビュー 活動
1
10月 20
9159
0
10月 19
3880
0
6月 16
3244
2
2月 16
4577
2
2月 25
1984