Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5469 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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

like groups="base.group_no_one"

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
sie 23
12518
0
lis 16
1510
1
mar 15
5045
2
mar 15
5030
4
paź 20
7003