[FIX] hr_holidays: fix leaves count domain
In active leave types should not be considered. closes odoo/odoo#34475 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user