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

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

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Dez. 23
90805
3
Sept. 21
4991
4
Apr. 25
4996
3
Juli 23
5637
2
März 22
10433