Browse Source

[FIX] Rename Warning as UserError

pull/296/head
Denis Roussel 8 years ago
parent
commit
66eae157bb
  1. 4
      partner_identification/models/res_partner_id_category.py

4
partner_identification/models/res_partner_id_category.py

@ -11,7 +11,7 @@
from openerp import api, models, fields
from openerp.exceptions import ValidationError, Warning
from openerp.exceptions import ValidationError, Warning as UserError
from openerp.tools.safe_eval import safe_eval
from openerp.tools.translate import _
@ -62,7 +62,7 @@ class ResPartnerIdCategory(models.Model):
mode='exec',
nocopy=True)
except Exception as e:
raise Warning(
raise UserError(
_('Error when evaluating the id_category validation code:'
':\n %s \n(%s)') % (self.name, e))
if eval_context.get('failed', False):

Loading…
Cancel
Save