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

Employee Manager must be able to view only his salary structure under the page "Employee Salary Structure". He must not be able to view the page in his team member's employee data alone.


頭像
捨棄
最佳答案

Hi Krithika Ravindran,

You can achieve this by using following code

<record id="you_unique_id" model="ir.rule">
<field name="name">Employee Salary Structure</field>
<field name="model_id" ref="model_your_model_name"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
</record>
If you have a group , you can add it below line
<field name="groups" eval="[(4, ref('model_name.group_name'))]"/>
Thank You.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
12月 23
14789
0
10月 23
33
3
10月 23
788
1
10月 23
569
1
8月 23
2506