Merge pull request !11345 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-05-08 07:07:12 +00:00
committed by Gitee
@@ -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: