Skip to Content
Menu
This question has been flagged
2 Replies
5306 Rodiniai

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

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

Portretas
Atmesti
Autorius

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"

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
4
rugp. 23
12336
0
lapkr. 16
1425
1
kov. 15
4890
2
kov. 15
4883
4
spal. 20
6839