添加功能
This commit is contained in:
@@ -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,8 +96,7 @@ 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
|
||||
|
||||
@@ -107,11 +106,11 @@ class RemoveHolidayApprovals(models.Model):
|
||||
('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:
|
||||
|
||||
Reference in New Issue
Block a user