mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
Merge pull request #346 from SimoRubi/patch-1
[FIX] quality_control: Constraint methods should raise ValidationError
This commit is contained in:
@@ -33,7 +33,7 @@ class QcTestTemplateCategory(models.Model):
|
||||
('parent_id', '!=', False)])
|
||||
ids = list(set([x.parent_id.id for x in parents]))
|
||||
if not level:
|
||||
raise exceptions.UserError(
|
||||
raise exceptions.ValidationError(
|
||||
_('Error! You can not create recursive categories.'))
|
||||
level -= 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user