[FIX] payment: untranslated string

Closes #17256
This commit is contained in:
Yenthe V.G
2017-05-29 10:57:14 +02:00
committed by Martin Trigaux
parent b1e524255a
commit 717002c2da
2 changed files with 21 additions and 3 deletions
+18
View File
@@ -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"
+3 -3
View File
@@ -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()