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