[FIX] gamification: bad backport to 8.0
UserError was defined in version 9, not 8
This commit is contained in:
parent
9772bbef07
commit
a4687c6e42
|
@ -155,9 +155,11 @@ class gamification_goal_definition(osv.Model):
|
||||||
model = self.pool[definition.model_id.model]
|
model = self.pool[definition.model_id.model]
|
||||||
field = model._fields[definition.field_id.name]
|
field = model._fields[definition.field_id.name]
|
||||||
if not field.store:
|
if not field.store:
|
||||||
raise UserError(_("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not stored") % (definition.name, definition.field_id.name))
|
raise osv.except_osv(_('Error!'),
|
||||||
|
_("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not stored") % (definition.name, definition.field_id.name))
|
||||||
except KeyError, e:
|
except KeyError, e:
|
||||||
raise UserError(_("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not found") % (definition.name, e.message))
|
raise osv.except_osv(_('Error!'),
|
||||||
|
_("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not found") % (definition.name, e.message))
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
res_id = super(gamification_goal_definition, self).create(cr, uid, vals, context=context)
|
res_id = super(gamification_goal_definition, self).create(cr, uid, vals, context=context)
|
||||||
|
|
Loading…
Reference in New Issue