[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) <tbe@odoo.com>
This commit is contained in:
Johan Demaret Rivarola
2019-03-11 15:44:39 +00:00
parent 3c9a50569a
commit 7612f2c55c
+4
View File
@@ -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,