ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Attendance list not showing employee display


#1

When I choose Employee from the list of Employees in the attendance form the employees names are not displayed in the list, while in the leave application it displays the employees names in the link form.


#2

please help me sir


#3

I found the solution in the update_attendance function of leave_application doctype add a new line

		elif getdate(self.to_date) <= getdate(nowdate()):
			for dt in daterange(getdate(self.from_date), getdate(self.to_date)):
				date = dt.strftime("%Y-%m-%d")
				doc = frappe.new_doc("Attendance")
				doc.employee = self.employee
				**doc.employee_name = self.employee_name**
				doc.attendance_date = date
				doc.company = self.company
				doc.leave_type = self.leave_type
				doc.status = "Half Day" if date == self.half_day_date else "On Leave"
				doc.flags.ignore_validate = True
				doc.insert(ignore_permissions=True)
				doc.submit()

Add the doc.employee_name = self.employee_name line, the error was that while creating attendance it was not updating the employee name


#4

Thank you so much …