* fix: wrong company selected when marking attendance for all employees * fix: enable caching for repeated queries of the same employee (cherry picked from commit b478e72cefbdffd3e906fdd1ef822becdead78d7) Co-authored-by: Mohammed Yusuf Shaikh <49878143+mohammedyusufshaikh@users.noreply.github.com>
This commit is contained in:
parent
4685ed5a8c
commit
9df5df4d94
@ -55,8 +55,7 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
|||||||
else:
|
else:
|
||||||
leave_type = None
|
leave_type = None
|
||||||
|
|
||||||
if not company:
|
company = frappe.db.get_value("Employee", employee['employee'], "Company", cache=True)
|
||||||
company = frappe.db.get_value("Employee", employee['employee'], "Company")
|
|
||||||
|
|
||||||
attendance=frappe.get_doc(dict(
|
attendance=frappe.get_doc(dict(
|
||||||
doctype='Attendance',
|
doctype='Attendance',
|
||||||
@ -68,4 +67,4 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
|||||||
company=company
|
company=company
|
||||||
))
|
))
|
||||||
attendance.insert()
|
attendance.insert()
|
||||||
attendance.submit()
|
attendance.submit()
|
||||||
Loading…
x
Reference in New Issue
Block a user