diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 62fad6ec6..e2895e49c 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -1289,8 +1289,7 @@ class HrAttendance(models.Model): 'absenteeism_card': False }) go_approval_domain = [ - ('users_id', '=', employee.user_id.id), - ('work_end', '=', True), + ('employee_ids', 'in', employee.id), ('start_date', '<=', current_date_str), ('end_date', '>=', current_date_str) ] @@ -1306,7 +1305,7 @@ class HrAttendance(models.Model): workflow = self.env['soong.workflow.record'].search([ ('code', '=', go_approval_record.code) ], limit=1) - if workflow: + if workflow and workflow.approve_state == 'end': attendance_recs.write({ 'workflow_id': workflow.id, 'is_workflow': True, diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index db805d246..18465ff53 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -783,7 +783,7 @@ - 更新数据 + 更新初始(1月)数据 code