From c6dbe8355e249ecbc28c3575d3f2d6c85486e4d9 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Thu, 5 Mar 2026 23:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E7=8F=AD=E6=98=8E=E7=BB=86=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= 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/overtime_approval.py | 1 + yuthon_hr_attendance/models/vacation_overtime_active.py | 3 ++- yuthon_hr_attendance/models/yuthon_overtime_line.py | 2 ++ yuthon_hr_attendance/models/yuthon_vacation_reports.py | 8 ++++++-- .../views/yuthon_vacation_reports_views.xml | 2 ++ yuthon_hr_attendance/wizard/pay_carryover_wizard.py | 2 ++ .../wizard/yuthon_vacation_import_wizard.py | 1 + 8 files changed, 18 insertions(+), 3 deletions(-) diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 6caf3c73b..e6b9cb8db 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -603,6 +603,7 @@ class HolidaysRequestBatch(models.Model): self.env['vacation.over.line'].create({ 'vacation_id': actual_vacation_report.id, 'employee_id': employee_id, + 'logging_data': '666', 'workflow_record_id': leave_data.get('workflow_id', False), 'update_type': 'reduce', 'workday': interval_hours, @@ -649,6 +650,7 @@ class HolidaysRequestBatch(models.Model): 'carry_forward_date': fields.Date.to_string(period_start), 'carry_forward_quantity': record.carry_forward_quantity + deduct_amount, 'carry_forward_state': carry_state, + 'logging_data': '113', }) remaining_deduct -= deduct_amount diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index 284197b39..c97637072 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -360,6 +360,7 @@ class OvertimeApprovals(models.Model): over.write({ 'workday': workday, 'legal_day': legal_day, + 'logging_data': '115', 'public_holidays': public_holidays, 'update_date': fields.Datetime.now(), }) diff --git a/yuthon_hr_attendance/models/vacation_overtime_active.py b/yuthon_hr_attendance/models/vacation_overtime_active.py index 826ff32da..6934c4ac6 100644 --- a/yuthon_hr_attendance/models/vacation_overtime_active.py +++ b/yuthon_hr_attendance/models/vacation_overtime_active.py @@ -43,7 +43,8 @@ class VacationOvertimeActive(models.Model): ]) overtime_lines.write({ 'workday': record.carry_forward_quantity, - 'update_date': record.carry_forward_date + 'update_date': record.carry_forward_date, + 'logging_data': 'qq', }) diff --git a/yuthon_hr_attendance/models/yuthon_overtime_line.py b/yuthon_hr_attendance/models/yuthon_overtime_line.py index 377b8757b..80bfdf3aa 100644 --- a/yuthon_hr_attendance/models/yuthon_overtime_line.py +++ b/yuthon_hr_attendance/models/yuthon_overtime_line.py @@ -154,6 +154,7 @@ class YuthonOvertimeLine(models.Model): rec.write({ 'carry_forward_quantity': rec.carry_forward_quantity + allocate_amount, 'carry_forward_state': new_state, + 'logging_data': 'w', 'carry_forward_date': overtime_id.carry_forward_date }) report_id = self.env['yuthon.vacation.reports'].search([ @@ -166,6 +167,7 @@ class YuthonOvertimeLine(models.Model): 'employee_id': rec.employee_id.id, 'department_id': rec.department_id.id, 'update_type': 'reduce', + 'logging_data': '555', 'workday': allocate_amount, 'update_date': fields.Date.today(), 'is_void': False, diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index dabcbff7b..8d00888e6 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -567,7 +567,8 @@ class YuthonVacationReports(models.Model): ]) if overtime_records: overtime_records.write({ - 'is_initial_number': True + 'is_initial_number': True, + 'logging_data': 'r', }) def write(self, vals): @@ -889,6 +890,7 @@ class YuthonVacationReports(models.Model): 'workday': rec.year_workday * 8, 'public_holidays': rec.year_holiday * 8, 'legal_day': 0.0, + 'logging_data': '444', 'text': "上月额度继承" } self.env['vacation.over.line'].create(over_line_create_vals) @@ -1544,7 +1546,8 @@ class YuthonVacationReports(models.Model): 'legal_day': 0, 'public_holidays': 0, 'meal_number': 0, - 'text': f"上月额度继承" + 'text': f"上月额度继承", + 'logging_data': '333', }) def _update_parental_leave_lines(self, report, allocations, number_of_hours_display, update_date, end_date): @@ -1942,6 +1945,7 @@ class VacationOverline(models.Model): default='pending', ) remaining_quantity = fields.Float(string='剩余数', compute="_compute_last_balance") + logging_data = fields.Char(string="日志日志日志") def open_record1(self): tree_id = self.env.ref("yuthon_hr_attendance.view_yuthon_vacation_overtime_tree").id diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 3baa0fdc5..ec3fb8c6b 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -268,6 +268,7 @@ +