[IMP] Improved code for confirm_order state in shopping_cart.

This commit is contained in:
Paramjit Singh Sahota 2014-04-09 12:27:12 +05:30
parent e627f1da63
commit 3ae307003a
1 changed files with 1 additions and 1 deletions

View File

@ -473,7 +473,7 @@ class Ecommerce(http.Controller):
# must have a draft sale order with lines at this point, otherwise redirect to shop
order = self.get_order()
if not order or order.state != 'draft' or not order.order_line:
if not order or order.state not in ['draft', 'shopping_cart'] or not order.order_line:
request.registry['website'].ecommerce_reset(cr, uid, context=context)
return request.redirect('/shop')
# if transaction pending / done: redirect to confirmation