mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] hr_payroll_attendance: repeated onchange in a single change will duplicate attendances in a set until saved
This commit is contained in:
@@ -33,7 +33,7 @@ class HrPayslip(models.Model):
|
||||
|
||||
attendance_to_keep = self.attendance_ids.filtered(lambda a: a.employee_id == self.employee_id
|
||||
and a.check_out.date() <= self.date_to)
|
||||
attendance_to_keep += self.env['hr.attendance'].search([
|
||||
attendance_to_keep |= self.env['hr.attendance'].search([
|
||||
('employee_id', '=', self.employee_id.id),
|
||||
('check_out', '<=', self.date_to),
|
||||
('payslip_id', '=', False),
|
||||
|
||||
Reference in New Issue
Block a user