Not able to select leave approver from the drop down list

I was trying to setup leave application. When i’m adding a leave application, there is no value showing in leave approver field. Even it is not listing for Admin also. How can i rectify this ??

1 Like

Have you found any solution on it. I am getting same issue.

@vainikshiv You must add leave approver in Department. Then it will come in leave approver fields.
But i need ‘Reports To’ person as lead approver ? is it possible ?

@rajeeb i have tried it too. After adding leave approver in department still i am not getting any leave approver in leave application form.

Did you set the leave approver for the employee?

@flexy2ky @rajeeb Oh! I got it. I haven’t set leave approver for particular department whichever i have set to employee. That’s why i am not getting leave approver in my leave application.
Thank you for your help

i have a different view. I think these are different versions. Mine is ERPNext v.11

Please set reports_to in employee form and give him leave approver role

If you’re in V12 then you should have it under Attendance and Leave Details:

I’ve set reports_to but i don’t know how to assign leave approver role to him. Can please tell me ?

In User form under Roles section tick for leave approver check box

@asd @vainikshiv I have solved this issue. In v12 we have leave approver field in employee doctype but not in v11. So I have followed the same way. I added a new field ‘Leave Approver’ and changed code for get_leave_approver() in the py file as :

def get_leave_approver(employee):
	leave_approver, department = frappe.db.get_value("Employee",
		employee, ["leave_approver", "department"])

	if not leave_approver and department:
		leave_approver = frappe.db.get_value('Department Approver', {'parent': department,
			'parentfield': 'leave_approvers', 'idx': 1}, 'approver')

	return leave_approver

And for leave approvers you have to assign leave approver role also. Otherwise they will not get privilege to submit the leave application

1 Like