From fe9b88a3badf8e2b105465ab3dec0837516448b4 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Mon, 12 May 2014 10:25:20 +0530 Subject: [PATCH] [REVERT] Reverted the changes of rev 9219. --- addons/website_sale/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index efa0256eb1b..082b3c7dfd7 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -260,7 +260,7 @@ class website_sale(http.Controller): # if transaction pending / done: redirect to confirmation tx = context.get('website_sale_transaction') - if tx.state != 'shopping_cart': + if tx and tx.state != 'shopping_cart': return request.redirect('/shop/payment/confirmation/%s' % order.id) def checkout_values(self, data=None): @@ -537,7 +537,7 @@ class website_sale(http.Controller): 'sale_order_id': order.id, }, context=context) request.session['sale_transaction_id'] = tx_id - elif tx.state == 'shopping_cart': # button cliked but no more info -> rewrite on tx or create a new one ? + elif tx and tx.state == 'shopping_cart': # button cliked but no more info -> rewrite on tx or create a new one ? tx.write({ 'acquirer_id': acquirer_id, })