[FIX] payment: use standard odoo exceptions

An old hack simple overrode the standard python ValueError instead
of except_orm, which explains how it survived for so long.
This commit is contained in:
Damien Bouvy
2016-09-01 15:58:41 +02:00
parent fe3c386363
commit 406611967b
+1 -5
View File
@@ -4,6 +4,7 @@ import logging
from odoo import api, exceptions, fields, models, _
from odoo.tools import float_round, image_resize_images
from odoo.addons.base.module import module
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
@@ -16,11 +17,6 @@ def _partner_split_name(partner_name):
return [' '.join(partner_name.split()[:-1]), ' '.join(partner_name.split()[-1:])]
class ValidationError(ValueError):
""" Used for value error when validating transaction data coming from acquirers. """
pass
class PaymentAcquirer(models.Model):
""" Acquirer Model. Each specific acquirer can extend the model by adding
its own fields, using the acquirer_name as a prefix for the new fields.