[FIX] project: raise validation error
The ValidationError in Task._check_dates was returned instead of raised Closes #14393
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user