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

When an employee edits his/her information I want to restrict certain fields not to edit by employee (but can be editable by ADMIN).

アバター
破棄
最善の回答

Hi,

You could use the "read" and "write" attributes on field definition, like this one:

    _columns = {
        'credit_limit': fields.float(string='Credit Limit',
                                     read=['base.group_sale_salesman'],
                                     write=['base.group_sale_manager']),

This will create a field named credit_limit that will be readable by users belonging to base.group_sale_salesman and writable only by base.group_sale_manager users...

アバター
破棄
著作者

Hi Mario, Thanks for the reply. It helped me a lot.

最善の回答

You can apply group on that field.admin exist to that group not user.

like groups="base.group_no_one"

アバター
破棄
関連投稿 返信 ビュー 活動
4
8月 23
12262
0
11月 16
1391
1
3月 15
4836
2
3月 15
4826
4
10月 20
6754