From 86c4debff081bd16aa62b65dec545d374cf73611 Mon Sep 17 00:00:00 2001 From: Prashant Panchal Date: Thu, 18 Dec 2014 12:00:08 +0530 Subject: [PATCH] [REM] User-friendly constraint error For Python constraints defined with the v7 API, the ORM used to display a complex error message. We remove these technical terms for the end-user. --- openerp/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openerp/models.py b/openerp/models.py index a9e2a6f5c49..fa5b9aa245f 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -1268,10 +1268,7 @@ class BaseModel(object): res_msg = trans._get_source(self._name, 'constraint', self.env.lang, msg) if extra_error: res_msg += "\n\n%s\n%s" % (_('Error details:'), extra_error) - errors.append( - _("Field(s) `%s` failed against a constraint: %s") % - (', '.join(names), res_msg) - ) + errors.append(_(res_msg)) if errors: raise ValidationError('\n'.join(errors))