Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5176 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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

Nejlepší odpověď

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

like groups="base.group_no_one"

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
srp 23
12086
0
lis 16
1327
1
bře 15
4757
2
bře 15
4660
4
říj 20
6608