diff --git a/yuthon_hr_attendance/wizard/export_date_wizard.py b/yuthon_hr_attendance/wizard/export_date_wizard.py index f8319b6b0..a6c09ec22 100644 --- a/yuthon_hr_attendance/wizard/export_date_wizard.py +++ b/yuthon_hr_attendance/wizard/export_date_wizard.py @@ -228,8 +228,6 @@ class ExportDateWizard(models.TransientModel): raise UserError(f'在 {self.year} 年 {self.month} 月没有找到符合条件的加班归档记录') export_data = [] - carry_result_dict = dict(self.env['vacation.over.line']._fields['carry_result'].selection) - for active in active_records: year = int(active.select_year) if active.select_year else start_date.year month = int(active.select_month) if active.select_month else start_date.month @@ -270,7 +268,7 @@ class ExportDateWizard(models.TransientModel): 'end_time': (over_line.end_time + timedelta(hours=8)).strftime('%Y-%m-%d %H:%M:%S') if over_line and over_line.end_time else '', 'carry_forward_date': record.carry_forward_date, 'carry_forward_quantity': record.carry_forward_quantity, - 'carry_result': carry_result_dict.get(record.carry_result or (over_line.carry_result if over_line else None), '') if (record.carry_result or (over_line and over_line.carry_result)) else '', + 'carry_result': '成功', } export_data.append(row_data)