Browse Source

exception

pull/31/head
Lorenzo Battistini 12 years ago
committed by Gilles Meyomesse
parent
commit
f5927163f4
  1. 3
      base_optional_quick_create/model.py

3
base_optional_quick_create/model.py

@ -20,6 +20,7 @@
from openerp.osv import orm, fields from openerp.osv import orm, fields
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
from openerp.tools.translate import _
class ir_model(orm.Model): class ir_model(orm.Model):
@ -31,7 +32,7 @@ class ir_model(orm.Model):
def _wrap_name_create(self, old_create, model): def _wrap_name_create(self, old_create, model):
def wrapper(cr, uid, name, context=None): 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 return wrapper
def _register_hook(self, cr, ids=None): def _register_hook(self, cr, ids=None):

Loading…
Cancel
Save