From 90ebd0ccbc7c356a32f727f5d6d4e1def1e63dd1 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: Sat, 31 Jan 2026 20:47:43 +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_holiday/models/inherit_hr_leave.py | 2 +-
yuthon_hr_attendance/models/yuthon_vacation_reports.py | 4 ++--
.../views/yuthon_vacation_reports_views.xml | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 001c600c6..89ef499cf 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -548,7 +548,6 @@ class HolidaysRequestBatch(models.Model):
'text': f"请假审批"
})
('start_time', '>=', datetime(2025, 12, 1)),
-
remaining_deduct = deduct_days
vacation_report.vacation_report += deduct_days
# 优先扣减上年剩余(补休)
@@ -565,6 +564,7 @@ class HolidaysRequestBatch(models.Model):
vacation_report.this_year1 -= remaining_deduct
else:
vacation_report.this_year1 = 0.0
+ vacation_report._compute_working_overtime()
domain = [
('employee_id', '=', self.users_id.employee_ids.id),
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index 1bcdc5946..c9ab03e6a 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -542,12 +542,12 @@ class YuthonVacationReports(models.Model):
for record in records:
record._compute_display_date()
- def update_state(self):
+ def update_working_overtime(self):
records = self.env["yuthon.vacation.reports"].browse(
self._context.get('active_ids', self._context.get('active_id', self.ids))
)
for record in records:
- record.vacation_state = 'not_sent'
+ record._compute_working_overtime()
@api.depends('vacation_date')
def _compute_display_date(self):
diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
index c67f8482f..e6db0e4c9 100644
--- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
@@ -784,12 +784,12 @@
code
action = model.update_vacation()
-
- 还原状态
+
+ 一次性
code
- action = model.update_state()
+ action = model.update_working_overtime()
更新报表