Team Leader shouldn't see his team Salary Slip

Their is a Team Leader of a team, and 3 people working under him (total 4 people)

“reports_to” of all the employee working under the Team Leader is set to Team Leader’s id.
now the Team Leader can see the employee data of all the employee working under him (whose reports_to is set to TL’s id).

Now problem is TL can see the “Salary Slip” of all employee working under him.
because of reports_to set in the Employee master, when i remove this reports_to then salary slip is not visible

Anyone help, so that TL should see only his Salary Slip

Hi @Rajat96318,

Just so you know, the features we’re talking about are in version 14 or newer of ERPNext. I’m not super familiar with all the details, but I think you should look at the official guides or documentation to get a clear idea.

Thank You!

no the issue is not resolved in Version 14 also, i fully run the process just now

the TL can see the salary slip

Anyone please help, any progress is helpful, i am stuck in this task

You can create a role for him and assign all the necessary permissions for him to manage his team, excluding the salary slip.

Hello @Rajat96318 ,

Use Hide Descendants option in User Permission to achieve this.

Create a Team Leader user permission for Salary Slips and check the ‘Hide Descendants’ option. This ensures that the Team Leader will not see the salary slips of employees who report to them.

This will solve your problem.

@Rehan_Ansari no it will not solve the problem, i already did this
when i did this, then the TL sees all the Employee List data (who are in the same company), since you are particularly assigning the TL to see only Salary slip of his own, therefore all other data will be shown like Employee, Leave application, attendance request etc.
If he sees the data of only those who are working under him, whose “reports_to” field is set to this employee (TL), then only my issue will be resolved.

Anyone who knows the solution

@Rajat96318 you got any solution on this issue…
if you got plz share us…
i also stuck in this issue…

This is an issue with the reporting person being able to see his reporting employee’s documents irrespective of permissions being applied.
You could try to add other user permissions to documents that are unique to the TL but is also linked to the Salary Slip.

For example, you can map the salary structure assignment as a new link field in the salary slips and write a script that automatically fetches the salary structure assignment.

Then if you apply user permissions for the salary structure assignment (applied for all descendants), it should restrict the salary slips such that he’ll be able to see only his own.

@Rajat96318 try this