Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
5257 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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

Beste Antwort

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

like groups="base.group_no_one"

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
Aug. 23
12301
0
Nov. 16
1395
1
März 15
4855
2
März 15
4848
4
Okt. 20
6781