Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2276 Prikazi

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.


Avatar
Opusti
Best Answer

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.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
dec. 23
14889
0
okt. 23
33
3
okt. 23
789
1
okt. 23
569
1
avg. 23
2538