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

Hi,

Im want to have a field that can only be edited by users of group A, but can be displayed (but not edited / readonly) by users of group B.

How can I achive this in OpenERP? I've tried different methods but all of them completely remove the field for unauthorized groups.

Regards.

Avatar
Zrušit
Nejlepší odpověď

Hi, you can use this in your py file field...

'name': fields.char('Name', size=128, read=['base.group_userA'], write=['base.group_userB'] )

Read will allow the user group to view and Write will allow the user group to edit the field..

Thanks & if it works accept the answer...

Avatar
Zrušit
Autor

Thanks for the answer it works, unauthorized users can still edit the field but the changes are not saved is there a way to make the field completely uneditable?

Try this in your xml file... <field name="name" groups="base.group_userB"/>. Now the userB group only can view the field....

Related Posts Odpovědi Zobrazení Aktivita
3
pro 23
90710
3
zář 21
4938
4
dub 25
4810
3
čvc 23
5597
2
bře 22
10386