From 7f524c393df364a9ccc1d62f75fd02bdbacf70d2 Mon Sep 17 00:00:00 2001 From: Toufik Ben Jaa Date: Wed, 16 Jan 2019 09:40:08 +0000 Subject: [PATCH] [FIX] payment: display payment tokens for form acquirers - The method `_get_available_payment_input` that returns the available payments acquirers and the payments tokens for a specific user never returns the payments tokens linked to a non s2s payment acquirers. This is wrong, the payments tokens should always appears no matter what are the acquirers' payment flow. The payment flow is used only to specify where the customer should input his credit cards details, either on Odoo or on the payment acquirer's website (or popup). Once a token is created, it is safe to process it since no credits cards details are stored on the Odoo database. closes odoo/odoo#30258 --- addons/payment/models/payment_acquirer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index afed11da38e..209c4556d7b 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -324,7 +324,7 @@ class PaymentAcquirer(models.Model): 'acquirers': acquirers, 'pms': self.env['payment.token'].search([ ('partner_id', '=', partner.id), - ('acquirer_id', 'in', acquirers.filtered(lambda acq: acq.payment_flow == 's2s').ids)]), + ('acquirer_id', 'in', acquirers.ids)]), } @api.multi