Skip to Content
Menu
This question has been flagged
2 Replies
5820 Views

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

Avatar
Discard
Best Answer

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...

Avatar
Discard
Author

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

Best Answer

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

like groups="base.group_no_one"

Avatar
Discard
Related Posts Replies Views Activity
4
Aug 23
12948
0
Nov 16
1748
1
Mar 15
5319
2
Mar 15
5350
4
Oct 20
7446