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()
+
更新报表