跳至內容
選單
此問題已被標幟
1 回覆
8970 瀏覽次數

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.

頭像
捨棄
最佳答案

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

頭像
捨棄
作者

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

相關帖文 回覆 瀏覽次數 活動
3
12月 23
91058
3
9月 21
5139
4
4月 25
5371
3
7月 23
5769
2
3月 22
10533