From 08d51a7c790f9db6e7e64660a609d1ceacd5e8ab Mon Sep 17 00:00:00 2001 From: Kinjal Mehta Date: Mon, 18 Jul 2016 12:07:33 +0530 Subject: [PATCH] [IMP] hr_holidays: raise date consistency warning on save only --- addons/hr_holidays/models/hr_holidays.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/hr_holidays/models/hr_holidays.py b/addons/hr_holidays/models/hr_holidays.py index ea207c3cc8b..7a7f5e99d8b 100644 --- a/addons/hr_holidays/models/hr_holidays.py +++ b/addons/hr_holidays/models/hr_holidays.py @@ -296,9 +296,6 @@ class Holidays(models.Model): """ date_from = self.date_from date_to = self.date_to - # date_to has to be greater than date_from - if (date_from and date_to) and (date_from > date_to): - raise UserError(_('The start date must be anterior to the end date.')) # No date_to set so far: automatically compute one 8 hours later if date_from and not date_to: @@ -316,9 +313,6 @@ class Holidays(models.Model): """ Update the number_of_days. """ date_from = self.date_from date_to = self.date_to - # date_to has to be greater than date_from - if (date_from and date_to) and (date_from > date_to): - raise UserError(_('The start date must be anterior to the end date.')) # Compute and update the number of days if (date_to and date_from) and (date_from <= date_to):