From 65c9ed39b2d0107902b8f57ee71aad9645e5f9d0 Mon Sep 17 00:00:00 2001 From: sofiagvaladze Date: Fri, 13 Oct 2023 11:36:50 +0200 Subject: [PATCH] [FIX] hr_holidays: remove archived active_test=False on employee field In odoo/odoo#135245 we added context={'active_test': False} on the all_employee_ids on hr.leave model. While it might have sounded like a good idea on the first glance (we see the avatar of the archived employees), it will potentially cause more side effects than bring good. For example, for the employees that left the company and came back, if might cause issues when we are trying to create time off for them. It also introduced noise in the views. Here we alter this change. closes odoo/odoo#138686 X-original-commit: 9c09272f28aac4e66e3343a0e397540e222336fb Signed-off-by: Bertrand Dossogne (bedo) --- addons/hr_holidays/models/hr_leave.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/models/hr_leave.py b/addons/hr_holidays/models/hr_leave.py index 8d8867bd7ea..a525720fa84 100644 --- a/addons/hr_holidays/models/hr_leave.py +++ b/addons/hr_holidays/models/hr_leave.py @@ -220,7 +220,7 @@ class HolidaysRequest(models.Model): inverse='_inverse_supported_attachment_ids') supported_attachment_ids_count = fields.Integer(compute='_compute_supported_attachment_ids') # UX fields - all_employee_ids = fields.Many2many('hr.employee', compute='_compute_all_employees', compute_sudo=True, context={'active_test': False}) + all_employee_ids = fields.Many2many('hr.employee', compute='_compute_all_employees', compute_sudo=True) leave_type_request_unit = fields.Selection(related='holiday_status_id.request_unit', readonly=True) leave_type_support_document = fields.Boolean(related="holiday_status_id.support_document") # Interface fields used when not using hour-based computation