Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
5213 Представления

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"

Аватар
Отменить
Related Posts Ответы Просмотры Активность
4
авг. 23
12191
0
нояб. 16
1369
1
мар. 15
4819
2
мар. 15
4766
4
окт. 20
6702