let say their are 3 teams in company, each has a team leader, which has give permission of leave approver, every employee under a team leader reports tom him.
basically i have filled the “reports_to” field in Employee master
but i want like employee sees only his Salary Slip, leave approver roles should also see his Salary slip only.
Anyone who knows the solution, correct me if i am wrong anywhere @NCP bro please look once
@avc@rmehta please help, i am stuck in this task, also leave approver is able to approve and submit his own Leave Application.
Leave approver’s reports_to is manager
Employee doctype is tree structure.
If user B reports to user A, then user A will have access to user B unless you specify Hide Descendants in their user permission.
@rtdany10 man did you ever tested this scenario, you just giving an ideal solution which everyone try on first go
the thing which you said, i did that and now the user can see only his data, his “Leave application”, his all thing. What about the people who are working under him, those people Leave Application gone now.
If you want him to see Leave Application of his subordinates, then add one more user permission for him, specifically for Leave Application without the Hide Descendants checked. Maybe try being less arrogant and learn how user permission work.
@rtdany10 , sorry man, i apologise
Their are many doctype, for which now i have do this, which you are saying for Leave Application, others Doctype like : Attendance request, Attendance, Shift type, Shift assignment, Leave policy, Loan Application, Loan, etc many more
Since their is not only one Team Leader, doing this i think is not a valid approach, do you have any other suggestion