添加功能

This commit is contained in:
李鹏宇
2026-02-28 22:17:28 +08:00
parent 29397cac25
commit fea8bf7b18
@@ -430,7 +430,8 @@ class YuthonVacationReports(models.Model):
if inherit_overtime_lines:
inherit_over_update_lines = inherit_overtime_lines.workday + inherit_overtime_lines.public_holidays
rec.dynamic_previous_year1 = inherit_over_update_lines / 8 # 初始补休上年剩余
rec.last_workday = inherit_over_update_lines / 8 - rec.last_holiday if rec.last_holiday else inherit_over_update_lines / 8
rec.last_workday = inherit_overtime_lines.workday / 8
rec.last_holiday = inherit_overtime_lines.public_holidays / 8
# 3. 筛选overtime_ids中workflow_record_id有值且update_type="增加"的明细,计算总增加额
over_increase_lines = rec.overtime_ids.filtered(