From 73c52bbc603d19396b15d28b5eb14566bb93ed1d 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: Mon, 9 Feb 2026 20:03:45 +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 --- .../models/yuthon_overtime_line.py | 2 +- .../models/yuthon_vacation_reports.py | 18 ++++++------------ .../src/xml/button_overtime_active_export.xml | 2 +- .../wizard/export_date_wizard.py | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/yuthon_hr_attendance/models/yuthon_overtime_line.py b/yuthon_hr_attendance/models/yuthon_overtime_line.py index e10972795..019cd0242 100644 --- a/yuthon_hr_attendance/models/yuthon_overtime_line.py +++ b/yuthon_hr_attendance/models/yuthon_overtime_line.py @@ -186,7 +186,7 @@ class YuthonOvertimeLine(models.Model): @api.model def carryover_details(self): - domain = [('vacation_sum', '>', 40), + domain = [('vacation_sum', '>', 40.1), ('remaining_quantity', '!=', 0.0) ] overtime_lines = self.env['yuthon.overtime.line'].search(domain) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 6b8e83fed..767a7da81 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -1470,7 +1470,8 @@ class YuthonVacationReports(models.Model): '&', ('workflow_record_id', '!=', False), '&', ('start_time', '>=', dec_2025_end), '&', ('vacation_id', '!=', False), - ('start_time', '<=', current_date) + ('start_time', '<=', current_date), + ('employee_id.is_annual_salary', '!=', True) ] else: domain = [ @@ -1481,9 +1482,6 @@ class YuthonVacationReports(models.Model): ] all_records = self.env['vacation.over.line'].search(domain) over_lines = all_records.filtered(lambda r: abs(r.remaining_quantity) > 1e-6) - if not over_lines: - return - employee_summary = {} for line in over_lines: emp_id = line.employee_id.id @@ -1549,7 +1547,8 @@ class YuthonVacationReports(models.Model): '&', ('workflow_record_id', '!=', False), '&', ('start_time', '>=', dec_2025_end), '&', ('vacation_id', '!=', False), - ('start_time', '<=', current_date) + ('start_time', '<=', current_date), + ('employee_id.is_annual_salary', '!=', True) ] else: domain = [ @@ -1560,9 +1559,6 @@ class YuthonVacationReports(models.Model): ] all_records = self.env['vacation.over.line'].search(domain) over_lines = all_records.filtered(lambda r: abs(r.remaining_quantity) > 1e-6) - if not over_lines: - return - employee_summary = {} for line in over_lines: emp_id = line.employee_id.id @@ -1626,7 +1622,8 @@ class YuthonVacationReports(models.Model): '&', ('workflow_record_id', '!=', False), '&', ('start_time', '>=', dec_2025_end), '&', ('vacation_id', '!=', False), - ('start_time', '<', current_month_first_dt) + ('start_time', '<', current_month_first_dt), + ('employee_id.is_annual_salary', '!=', True) ] else: domain = [ @@ -1638,9 +1635,6 @@ class YuthonVacationReports(models.Model): all_records = self.env['vacation.over.line'].search(domain) over_lines = all_records.filtered(lambda r: abs(r.remaining_quantity) > 1e-6) - if not over_lines: - return - employee_summary = {} for line in over_lines: emp_id = line.employee_id.id diff --git a/yuthon_hr_attendance/static/src/xml/button_overtime_active_export.xml b/yuthon_hr_attendance/static/src/xml/button_overtime_active_export.xml index a68a01240..765ee905d 100644 --- a/yuthon_hr_attendance/static/src/xml/button_overtime_active_export.xml +++ b/yuthon_hr_attendance/static/src/xml/button_overtime_active_export.xml @@ -3,7 +3,7 @@ diff --git a/yuthon_hr_attendance/wizard/export_date_wizard.py b/yuthon_hr_attendance/wizard/export_date_wizard.py index d546a9e7e..e69f89fe5 100644 --- a/yuthon_hr_attendance/wizard/export_date_wizard.py +++ b/yuthon_hr_attendance/wizard/export_date_wizard.py @@ -213,7 +213,7 @@ class ExportDateWizard(models.TransientModel): """导出加班归档明细""" active_ids = json.loads(self.active_ids) if self.active_ids else [] - domain = [('carry_forward_date', '>=', start_date), ('carry_forward_date', '<', end_date), ('is_void','=', False)] + domain = [('carry_forward_date', '>=', start_date), ('carry_forward_date', '<', end_date), ('is_void','=', False), ('carry_forward_quantity', '>', 0)] if active_ids: domain = [('id', 'in', active_ids)] + domain