@@ -1981,15 +1981,18 @@ class YuthonVacationReports(models.Model):
|
||||
('text', '=', '上月额度继承'),
|
||||
], limit=1)
|
||||
if existing_line:
|
||||
continue
|
||||
self.env['vacation.parenting.line'].sudo().create({
|
||||
'vacation_id': report.id,
|
||||
'employee_id': report.employee_id.id,
|
||||
'update_date': update_date,
|
||||
'end_date': end_date,
|
||||
'lines': number_of_hours_display,
|
||||
'text': f"上月额度继承",
|
||||
})
|
||||
existing_line.write({
|
||||
'lines': number_of_hours_display,
|
||||
})
|
||||
else:
|
||||
self.env['vacation.parenting.line'].sudo().create({
|
||||
'vacation_id': report.id,
|
||||
'employee_id': report.employee_id.id,
|
||||
'update_date': update_date,
|
||||
'end_date': end_date,
|
||||
'lines': number_of_hours_display,
|
||||
'text': f"上月额度继承",
|
||||
})
|
||||
|
||||
def _update_meal_lines(self, report, allocations, number_of_hours_display):
|
||||
for alloc in allocations:
|
||||
|
||||
Reference in New Issue
Block a user