コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3425 ビュー

Just an example: An employee have some private information. An employee can see his own private information. But should not see other employee private information. In that case we can use attrs = "{'invisible': []}". It can invisible from view. But it's not secure. it's actually eye wash. if we inspect browser & go to Network-> XHR-> read-> JSON response, got the other employee private information. it's the problem of odoo security. there have any other solution for form view of odoo. It'll be helpful for us.

アバター
破棄
最善の回答

Hi,

Try like below.

<record id="hr_personal_rule" model="ir.rule">
<field name="name">Employee</field>
<field ref="hr.model_hr_employee" name="model_id"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('group_name'))]"/>
</record>



if you want to show some fields in employee records to only a particular group of users, you can use the group attribute along with that field.

<field name="location_id" groups="group_name"/>

 

 

Regards

アバター
破棄
関連投稿 返信 ビュー 活動
0
12月 24
690
0
4月 22
3522
0
5月 18
4302
1
3月 25
1292
1
6月 24
2675