From 6842349b5789ccd22ffef1245ecf36cd93a33ad5 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: Wed, 4 Feb 2026 19:51:19 +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
---
soong_workflow/views/soong_workflow_record.xml | 2 +-
yuthon_hr_attendance/controllers/portal.py | 1 +
yuthon_hr_attendance/data/attendance_time_data.xml | 13 +++++++++++++
.../models/yuthon_vacation_reports.py | 8 ++++++++
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index 1311ed209..366265392 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -460,7 +460,7 @@
ir.actions.act_window
soong.workflow.record
tree,kanban,search
- [('reclaim_state', '=', False), ('member_of_department', '=', True), ('is_company', '=', True)]
+ [('reclaim_state', '=', False), ('member_of_department', '=', True), ('is_company', '=', True),('approve_state','!=','start'),('approvals_group_id.name', '!=', '考勤')]
{'search_default_my_department_shifts': True,}
diff --git a/yuthon_hr_attendance/controllers/portal.py b/yuthon_hr_attendance/controllers/portal.py
index 3991b444a..fefe39db2 100644
--- a/yuthon_hr_attendance/controllers/portal.py
+++ b/yuthon_hr_attendance/controllers/portal.py
@@ -93,6 +93,7 @@ class CustomerPortal(portal.CustomerPortal):
'异常': format_vacation_value(record.is_abnormal, '次'),
'年假': format_vacation_value(record.done_leave, '天'),
'加班时': format_vacation_value(record.done_working_overtime, '小时', 8),
+ '补休': format_vacation_value(record.cop_leave, '小时', 8),
'调休': format_vacation_value(record.compensatory_leave, '天'),
'事假': format_vacation_value(record.leave_of_absence, '天'),
'加班时(法定假)': format_vacation_value(record.statutory_leave, '小时', 8),
diff --git a/yuthon_hr_attendance/data/attendance_time_data.xml b/yuthon_hr_attendance/data/attendance_time_data.xml
index 2ed26133a..23934e79a 100644
--- a/yuthon_hr_attendance/data/attendance_time_data.xml
+++ b/yuthon_hr_attendance/data/attendance_time_data.xml
@@ -1,6 +1,19 @@
+
+ 定时任务:考勤台账重新计算
+
+ code
+ model.update_vacation_task()
+
+
+ days
+ 1
+
+ -1
+
+
定时任务:考勤缺卡判断
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index 0caea3b95..e4c4712dd 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -109,6 +109,14 @@ class YuthonVacationReports(models.Model):
tracking=3,
default='not_sent')
+ def update_vacation_task(self):
+ today = date.today()
+ current_month_first = today.replace(day=1)
+ vacation_ids = self.search([('vacation_date', '=', current_month_first)])
+ for vacation in vacation_ids:
+ vacation.update_line()
+
+
def update_line(self):
self.manage_reject()
# ========== 第一步:处理年假逻辑 ==========