加班归档

This commit is contained in:
李鹏宇
2026-04-16 12:23:12 +08:00
parent 63748c6e4e
commit 991c742ff6
@@ -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)