Fix when searching global error message

Global error message must not be search by Model name.
This commit is contained in:
Cédric Krier
2012-03-06 12:29:28 +01:00
parent f2c24e3042
commit 29a474f669
+5
View File
@@ -32,6 +32,8 @@ class WarningErrorMixin(object):
language = Transaction().language
res = translation_obj.get_source(self._name, 'error', language, error)
if not res:
res = translation_obj.get_source(error, 'error', language)
if res:
error = res
@@ -47,6 +49,9 @@ class WarningErrorMixin(object):
res = translation_obj.get_source(self._name, 'error', language,
error_description)
if not res:
res = translation_obj.get_source(error_description, 'error',
language)
if res:
error_description = res