diff --git a/addons/project/models/project.py b/addons/project/models/project.py index a36e7209dd4..cf5ef270375 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -415,7 +415,7 @@ class Task(models.Model): @api.constrains('date_start', 'date_end') def _check_dates(self): if any(self.filtered(lambda task: task.date_start and task.date_end and task.date_start > task.date_end)): - return ValidationError(_('Error ! Task starting date must be lower than its ending date.')) + raise ValidationError(_('Error ! Task starting date must be lower than its ending date.')) # Override view according to the company definition @api.model