Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5210 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

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

like groups="base.group_no_one"

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
aug. 23
12171
0
nov. 16
1354
1
mar. 15
4813
2
mar. 15
4747
4
oct. 20
6692