[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user