Hi all ,
i`m working on Time attendance App .
and i have fields like attend_time and leave_time with datatype (Time)
but when i try to make new doc and insert in attendance doctype with one them the other take time to now and does not take null value
even if i try to set the value to empty from the attendance doctype does not take empty value
please help
def add_attendance(employee, status, date, attend_time=None, leave_time=None, late_minutes=0.0, attend_notes=None, leave_type=None):
attendance = frappe.new_doc("Attendance")
attendance.employee = employee['employee']
attendance.employee_name = employee['employee_name']
attendance.attendance_date = date
attendance.attend_time = attend_time
attendance.leave_time = leave_time
attendance.delay_minutes = late_minutes
attendance.notes = attend_notes
attendance.status = status
attendance.company = frappe.db.get_value("Employee", employee['employee'], "Company")
if status == "On Leave" and leave_type:
attendance.leave_type = leave_type
attendance.submit()