Skip to content
Snippets Groups Projects
Commit 467ac984 authored by Cas Vissers's avatar Cas Vissers
Browse files

[FIX] hr_holidays: fix leaves count domain


In active leave types should not be considered.

closes odoo/odoo#34475

Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 53ef2528
Branches
Tags
No related merge requests found
......@@ -146,6 +146,7 @@ class Employee(models.Model):
all_leaves = self.env['hr.leave.report'].read_group([
('employee_id', 'in', self.ids),
('holiday_status_id.allocation_type', '!=', 'no'),
('holiday_status_id.active', '=', 'True'),
('state', '=', 'validate')
], fields=['number_of_days', 'employee_id'], groupby=['employee_id'])
mapping = dict([(leave['employee_id'][0], leave['number_of_days']) for leave in all_leaves])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment