Skip to content

Commit eb044b7

Browse files
[FIX]: hr_holidays: fix time off type error in time off form view
fixed the error that appears when selecting a different time off type in the form view Task: 5241685
1 parent af46c2a commit eb044b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/hr_holidays/models/hr_leave_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _search_virtual_remaining_leaves(self, operator, value):
280280
leave_types = self.env['hr.leave.type'].search([])
281281

282282
def is_valid(leave_type):
283-
return not leave_type.requires_allocation or op(leave_type.virtual_remaining_leaves)
283+
return not leave_type.requires_allocation or op(leave_type.virtual_remaining_leaves, value)
284284
return [('id', 'in', leave_types.filtered(is_valid).ids)]
285285

286286
@api.depends_context('employee_id', 'default_employee_id', 'leave_date_from', 'default_date_from')

0 commit comments

Comments
 (0)