[FIX] base: translate _constraint message

While the error content is automatically translatable, the header was not.

Fixes #5645
This commit is contained in:
Martin Trigaux
2016-08-08 11:54:32 +02:00
parent 4f037210c2
commit a1fbb3d389
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -8148,6 +8148,12 @@ msgstr ""
msgid "Error details:"
msgstr ""
#. module: base
#: code:addons/models.py:1281
#, python-format
msgid "Error while validating constraint"
msgstr ""
#. module: base
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
+1 -1
View File
@@ -1278,7 +1278,7 @@ class BaseModel(object):
except ValidationError, e:
raise
except Exception, e:
raise ValidationError("Error while validating constraint\n\n%s" % tools.ustr(e))
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
@api.model
def default_get(self, fields_list):