[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) <anv@odoo.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user