From 37095004dcbdac03fc8dbe4c9cbbe1613822765e 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: Sun, 4 Jan 2026 17:30:17 +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/yuthon_vacation_reports.py | 10 ++++++++++ .../views/yuthon_vacation_reports_views.xml | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index ce9e29fdb..883a75ee0 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -105,6 +105,16 @@ class YuthonVacationReports(models.Model): ) records.write({'vacation_state': 'not_sent'}) + def update_wg_is_confirm(self): + records = self.env["yuthon.vacation.reports"].browse( + self._context.get('active_ids', self._context.get('active_id', self.ids)) + ) + for record in records: + inherit_vals = { + 'year_distribution': record.leave, + 'year_workday': record.working_overtime, + } + record.write(inherit_vals) def write(self, vals): result = super(YuthonVacationReports, self).write(vals) diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index fa4775d21..748bdab2e 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -519,6 +519,13 @@ code action = model.update_is_confirm() + + wg一次性 + + + code + action = model.update_wg_is_confirm() + 更新报表