[FIX] employee_requests: add permission type to domain
This commit is contained in:
parent
5249bcf8be
commit
93a563019c
|
|
@ -132,7 +132,7 @@ class HrPersonalPermission(models.Model):
|
|||
# function permission_number_decrement and _get_date_constrains replaced in new module hr permission holiday to fix
|
||||
# singleton issue and change constrain
|
||||
|
||||
@api.onchange('date_to', 'date_from', 'employee_id')
|
||||
@api.onchange('date_to', 'date_from', 'employee_id', 'permission_type_id')
|
||||
def permission_number_decrement(self):
|
||||
for item in self:
|
||||
# item._onchange_time()
|
||||
|
|
@ -152,6 +152,7 @@ class HrPersonalPermission(models.Model):
|
|||
number_of_per = item.permission_type_id.monthly_hours
|
||||
employee_permissions = self.search([
|
||||
('employee_id', '=', item.employee_id.id),
|
||||
('permission_type_id', '=', item.permission_type_id.id),
|
||||
('state', 'not in', ('draft','refused')),
|
||||
#('state', '=', 'approve'),
|
||||
('date_from', '>=', date_from),
|
||||
|
|
|
|||
Loading…
Reference in New Issue