Skip to Content
Menu
This question has been flagged
2 Replies
1989 Views

Hi, I am new to odoo and I am trying to set record rules to limit the access a user has on the platform. In particular, I am trying to set a limit so that an employee can see only their payrolls, and none of the other employees. I have tried several things but none of them worked so far.

Could anyone help me?


Avatar
Discard
Best Answer

Create a record rule and give a domain, [('employee_id.user_id', '=', user.id)] this will filter only records of logged in user for payslips.

Avatar
Discard
Author

thanks for the tip!

Author Best Answer

Got it!!!!
All I had to do was -> enter developer mode with assets -> settings-> technical settings -> record rules -> all payslips -> add the groups you need -> on the domain part add -> "[

'|', ('employee_id.user_id','=',user.id),('employee_id.user_id','=',False), ]"
Avatar
Discard