Merge pull request !10967 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-04-19 08:59:00 +00:00
committed by Gitee
@@ -2643,6 +2643,19 @@ class VacationOverline(models.Model):
}
def open_overtime_carryover(self):
carryover_ids = self.env['overtime.carryover'].search([
('over_line_id', '=', self.id),
('is_void', '=', False),
], order='carry_forward_date asc')
if carryover_ids:
total_balance = self.duration
current_remaining = total_balance
for carry in carryover_ids:
carry.sudo().write({
'last_month': current_remaining,
'this_month': current_remaining - carry.carry_forward_quantity,
})
current_remaining = carry.this_month
return {
"type": "ir.actions.act_window",
"name": "结转明细",