From 7612f2c55cd4795b109a3b3dc3099f280ce99a7f Mon Sep 17 00:00:00 2001 From: Johan Demaret Rivarola Date: Mon, 11 Mar 2019 10:29:19 +0000 Subject: [PATCH] [FIX] payment: remove transaction from session Sequentially previewing and paying two sale orders was causing a redirection issue. Instead of being redirect to the SO preview (/my/orders/<:order_id>), the user was redirected to /payment/process. The issue was due to processed transactions not being removed from the session. opw-1948288 Closes #31741 Signed-off-by: Toufik Benjaa (tbe) --- addons/payment/controllers/portal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 516eb8712a9..55a4d08e4b9 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -66,6 +66,10 @@ class PaymentProcessing(http.Controller): 'success': False, 'error': 'no_tx_found', } + + processed_tx = payment_transaction_ids.filtered('is_processed') + self.remove_payment_transaction(processed_tx) + # create the returned dictionnary result = { 'success': True,