!10603 添加功能

Merge pull request !10603 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-04-07 08:20:25 +00:00
committed by Gitee
@@ -77,7 +77,7 @@ class RemoveHolidayApprovals(models.Model):
'vacation.medical.line',
'vacation.other.line'
]
cancelled_over_line_ids = []
cancelled_over_line_ids = self.env['vacation.over.line']
if self.workflow_id1:
for model_name in detail_models:
detail_model = self.env[model_name]
@@ -96,22 +96,21 @@ class RemoveHolidayApprovals(models.Model):
('vacation_date', '>=', date)
])
if vacation_reports:
for vacation_report in vacation_reports:
vacation_report.update_line()
vacation_reports.update_line()
if model_name == 'vacation.over.line':
cancelled_over_line_ids = matching_detail_lines.ids
cancelled_over_line_ids = matching_detail_lines
if cancelled_over_line_ids:
carryover_records = self.env['overtime.carryover'].search([
('over_line_id1', 'in', cancelled_over_line_ids),
('over_line_id1', 'in', cancelled_over_line_ids.ids),
('carryover_type', '=', 'leave'),
])
for carry in carryover_records:
carry.write({'is_void': True,
'text': f'{self.name}'
})
for cancelled in cancelled_over_line_ids:
cancelled._compute_carry_forward_info()
carry.write({
'is_void': True,
'text': f'{self.name}'
})
cancelled_over_line_ids._compute_carry_forward_info()
record = self.env[self.workflow_id1.res_model].search([('id', '=', self.workflow_id1.res_id)])
if record: