diff options
| author | Martin Trigaux <mat@odoo.com> | 2016-05-26 08:29:39 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2016-05-26 08:30:51 +0200 |
| commit | a4687c6e42a7b0ec6b8d98dc2af7fe2d1c3272d0 (patch) | |
| tree | 66ea53939cd934966b7ac5904583f6dbe7d5b3df /addons/gamification | |
| parent | 9772bbef07e2f13a85faf7f6dc737d7c8be8119c (diff) | |
[FIX] gamification: bad backport to 8.0
UserError was defined in version 9, not 8
Diffstat (limited to 'addons/gamification')
| -rw-r--r-- | addons/gamification/models/goal.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index a63431a83c4..969d4321bab 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -155,9 +155,11 @@ class gamification_goal_definition(osv.Model): model = self.pool[definition.model_id.model] field = model._fields[definition.field_id.name] 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: - 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): res_id = super(gamification_goal_definition, self).create(cr, uid, vals, context=context) |
