From f3278ff07218ec16498b10406611d33c35a8a5a3 Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Thu, 20 Jun 2013 11:48:11 +0200 Subject: [PATCH] [imp] exception --- base_optional_quick_create/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base_optional_quick_create/model.py b/base_optional_quick_create/model.py index ad7b2142c..fc15593a7 100644 --- a/base_optional_quick_create/model.py +++ b/base_optional_quick_create/model.py @@ -20,6 +20,7 @@ from openerp.osv import orm, fields from openerp import SUPERUSER_ID +from openerp.tools.translate import _ class ir_model(orm.Model): @@ -31,7 +32,7 @@ class ir_model(orm.Model): def _wrap_name_create(self, old_create, model): def wrapper(cr, uid, name, context=None): - raise Exception("Can't create quickly. Opening create form") + raise orm.except_orm(_('Error'), _("Can't create quickly. Opening create form")) return wrapper def _register_hook(self, cr, ids=None):