From 15e874b5c862b3c9fc599c997d45328f9008be36 Mon Sep 17 00:00:00 2001 From: --global Date: Thu, 22 May 2014 15:34:09 +0200 Subject: [PATCH 1/2] [FIX] website_sale: still cleaning lost references to deleted code in website_sale ... Fixed checkout redirection that was meant to clean the session (incorrect sale order or transaction) that may happen when having issues with the payment. --- addons/website_sale/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index fd81aac6a1f..25e79a1c59a 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -255,7 +255,8 @@ class website_sale(http.Controller): # must have a draft sale order with lines at this point, otherwise reset if not order or order.state != 'draft': - request.website_sale_reset(cr, uid, context=context) + request.session['sale_order_id'] = None + request.session['sale_transaction_id'] = False return request.redirect('/shop') # if transaction pending / done: redirect to confirmation From 13ac3865d5536315882518c21defffb9d906d816 Mon Sep 17 00:00:00 2001 From: --global Date: Thu, 22 May 2014 15:40:29 +0200 Subject: [PATCH 2/2] [CLEAN] Use none or false, but not both on two lines ... --- addons/website_sale/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 25e79a1c59a..ff4761a848c 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -256,7 +256,7 @@ class website_sale(http.Controller): # must have a draft sale order with lines at this point, otherwise reset if not order or order.state != 'draft': request.session['sale_order_id'] = None - request.session['sale_transaction_id'] = False + request.session['sale_transaction_id'] = None return request.redirect('/shop') # if transaction pending / done: redirect to confirmation