Skip to content

Commit 73f3351

Browse files
committed
[FIX] hr_holidays : Force employee in context as False
Steps to reproduce: - Create a Time off type - Create allocations for some employees with the created type - Navigate to an allocation for a specific employee - Click on the time off type in the allocation form - Click on the smart button 'Allocations' - Notice each record showing the same time off type (X remaining out of Y) Cause: This is happening because when going through the allocation of a specific employee we add him in the context 'employee_id' so we compute the display name of the leave type and set it for each record as the same value as we compute leaves depending on the contextual employee. Fix: We are preventing the computation of the display name by forcing the employee_id in the context to force when we are using the smart button for allocations in the time off type form view opw-4841096 closes odoo#216699 X-original-commit: 38baf74 Signed-off-by: Bertrand Dossogne (bedo) <[email protected]> Signed-off-by: Youssef Bashandy (yoba) <[email protected]>
1 parent cb2510f commit 73f3351

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/hr_holidays/models/hr_leave_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ def action_see_days_allocated(self):
396396
('holiday_status_id', 'in', self.ids),
397397
]
398398
action['context'] = {
399+
'employee_id': False,
399400
'default_holiday_status_id': self.ids[0],
400401
'search_default_approved_state': 1,
401402
'search_default_year': 1,

0 commit comments

Comments
 (0)