@@ -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": "结转明细",
|
||||
|
||||
Reference in New Issue
Block a user