From cb181c27cb3d3418ef62a670525fd7a76bb94f63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Fri, 6 Feb 2026 12:22:35 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yuthon_hr_attendance/models/hr_attendance.py | 5 ++---
yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
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