diff --git a/addons/payment/i18n/payment.pot b/addons/payment/i18n/payment.pot index df4ef3963e5..75f46d8146e 100644 --- a/addons/payment/i18n/payment.pot +++ b/addons/payment/i18n/payment.pot @@ -579,6 +579,18 @@ msgstr "" msgid "Ogone" msgstr "" +#. module: payment +#: code:addons/payment/models/payment_acquirer.py:619 +#, python-format +msgid "Only transactions in the Authorized status can be captured." +msgstr "" + +#. module: payment +#: code:addons/payment/models/payment_acquirer.py:626 +#, python-format +msgid "Only transactions in the Authorized status can be voided." +msgstr "" + #. module: payment #: model:ir.model.fields,field_description:payment.field_payment_acquirer_auto_confirm msgid "Order Confirmation" @@ -954,6 +966,12 @@ msgstr "" msgid "reference: the transaction reference number" msgstr "" +#. module: payment +#: code:addons/payment/models/payment_acquirer.py:160 +#, python-format +msgid "Transaction Authorization is not supported by this payment provider." +msgstr "" + #. module: payment #: model:ir.ui.view,arch_db:payment.acquirer_form msgid "tx_url: transaction URL to post the form" diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 0e3e3b0fb5c..f451b7ee93e 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -157,7 +157,7 @@ class PaymentAcquirer(models.Model): def _check_authorization_support(self): for acquirer in self: if acquirer.auto_confirm == 'authorize' and acquirer.provider not in self._get_feature_support()['authorize']: - raise ValidationError('Transaction Authorization is not supported by this payment provider.') + raise ValidationError(_('Transaction Authorization is not supported by this payment provider.')) return True _constraints = [ @@ -616,14 +616,14 @@ class PaymentTransaction(models.Model): @api.multi def action_capture(self): if any(self.mapped(lambda tx: tx.state != 'authorized')): - raise ValidationError('Only transactions in the Authorized status can be captured.') + raise ValidationError(_('Only transactions in the Authorized status can be captured.')) for tx in self: tx.s2s_capture_transaction() @api.multi def action_void(self): if any(self.mapped(lambda tx: tx.state != 'authorized')): - raise ValidationError('Only transactions in the Authorized status can be voided.') + raise ValidationError(_('Only transactions in the Authorized status can be voided.')) for tx in self: tx.s2s_void_transaction()