diff options
| author | Johan Demaret Rivarola <jde@odoo.com> | 2019-03-11 10:29:19 +0000 |
|---|---|---|
| committer | Johan Demaret Rivarola <jde@odoo.com> | 2019-03-11 15:44:39 +0000 |
| commit | 7612f2c55cd4795b109a3b3dc3099f280ce99a7f (patch) | |
| tree | bea43860df1b0bd450dbae59d483c9a26b783124 /addons/payment/controllers | |
| parent | 3c9a50569a1d3483b3f0d57255f58116b98763d5 (diff) | |
[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>
Diffstat (limited to 'addons/payment/controllers')
| -rw-r--r-- | addons/payment/controllers/portal.py | 4 |
1 files changed, 4 insertions, 0 deletions
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, |
