From a7ddc7af78f2e1c29b9aa47e5252a18e9021bc49 Mon Sep 17 00:00:00 2001 From: Horacio Tellez Date: Fri, 30 Sep 2022 12:37:23 +0000 Subject: [PATCH] [FIX] payment_stripe: validation operations treated incorrectly When saving a payment method from the `my/payment_method` page validation is used as the type of operation. In the present validation operations were incorrectly filtered and treated as a payment. After this commit validation operations are processed in the `_stripe_create_checkout_session` function as it should. Task - 3001168 closes odoo/odoo#101923 X-original-commit: 7f371db1af160a5e89f9476540aee35f79769068 Signed-off-by: Antoine Vandevenne (anv) --- addons/payment_stripe/models/payment_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment_stripe/models/payment_transaction.py b/addons/payment_stripe/models/payment_transaction.py index 4cee239efe6..de5c6e23219 100644 --- a/addons/payment_stripe/models/payment_transaction.py +++ b/addons/payment_stripe/models/payment_transaction.py @@ -35,7 +35,7 @@ class PaymentTransaction(models.Model): if self.provider_code != 'stripe' or self.operation == 'online_token': return res - if self.operation == 'online_redirect': + if self.operation in ['online_redirect', 'validation']: checkout_session = self._stripe_create_checkout_session() return { 'publishable_key': stripe_utils.get_publishable_key(self.provider_id),