Skip to content
Snippets Groups Projects
Unverified Commit c80a32f9 authored by Yenthe V.G's avatar Yenthe V.G Committed by Martin Trigaux
Browse files

[FIX] payment: untranslated message

Without this the error message will always be in English, no matter the language
of the end-user.

Closes #17141
parent 02ce25ba
No related branches found
No related tags found
No related merge requests found
......@@ -805,6 +805,13 @@ msgstr ""
msgid "The payment transaction reference must be unique!"
msgstr ""
#. module: payment
#: code:addons/payment/models/account_payment.py:43
#, python-format
msgid "This feature is not available for payment acquirers set to the "Authorize" mode.\n"
"Please use a token from another provider than %s."
msgstr ""
#. module: payment
#: model:ir.model.fields,help:payment.field_payment_acquirer_image
msgid "This field holds the image used for this provider, limited to 1024x1024px"
......@@ -961,4 +968,3 @@ msgstr ""
#: model:ir.ui.view,arch_db:payment.acquirer_form
msgid "user: current user browse record"
msgstr ""
......@@ -39,8 +39,8 @@ class AccountPayment(models.Model):
def _do_payment(self):
if self.payment_token_id.acquirer_id.auto_confirm == 'authorize':
raise ValidationError('This feature is not available for payment acquirers set to the "Authorize" mode.\n'
'Please use a token from another provider than %s.' % self.payment_token_id.acquirer_id.name)
raise ValidationError(_('This feature is not available for payment acquirers set to the "Authorize" mode.\n'
'Please use a token from another provider than %s.') % self.payment_token_id.acquirer_id.name)
reference = "P-%s-%s" % (self.id, datetime.datetime.now().strftime('%y%m%d_%H%M%S'))
tx = self.env['payment.transaction'].create({
'amount': self.amount,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment