[FIX] ValidationError message not displaying correctly

This commit is contained in:
Stefan
2023-03-01 15:48:46 +01:00
parent 6bb6924291
commit 75e9eeb7ad

View File

@@ -22,8 +22,8 @@ class ProductProduct(models.Model):
raise ValidationError(
_(
"It is not possible to archive product '%s' which has "
"associated stock quantities." % res[0].product_id.display_name
)
"associated stock quantities."
) % res[0].product_id.display_name
)
@api.constrains("active")
@@ -39,8 +39,8 @@ class ProductProduct(models.Model):
raise ValidationError(
_(
"It is not possible to archive product '%s' which has "
"associated picking lines." % res[0].product_id.display_name
)
"associated picking lines."
) % res[0].product_id.display_name
)
@api.constrains("active")
@@ -56,6 +56,6 @@ class ProductProduct(models.Model):
raise ValidationError(
_(
"It is not possible to archive product '%s' which has "
"associated stock reservations." % res[0].product_id.display_name
)
"associated stock reservations."
) % res[0].product_id.display_name
)