Skip to content

Commit

Permalink
[FIX] hr_holidays: Add missing fields in constrains
Browse files Browse the repository at this point in the history
closes #32108

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
  • Loading branch information
sswapnesh committed Mar 25, 2019
1 parent 00797ed commit a432e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/hr_holidays/models/hr_leave.py
Expand Up @@ -470,7 +470,7 @@ def add_follower(self, employee_id):
self.message_subscribe(partner_ids=employee.user_id.partner_id.ids)

@api.multi
@api.constrains('holiday_status_id')
@api.constrains('holiday_status_id', 'date_to', 'date_from')
def _check_leave_type_validity(self):
for leave in self:
if leave.holiday_status_id.validity_start and leave.holiday_status_id.validity_stop:
Expand Down

0 comments on commit a432e5c

Please sign in to comment.