diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index ca6e396acf4..816a63132a9 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -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 not in ['draft', 'shopping_cart'] or not order.order_line: + if not order or order.state != 'draft' 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 diff --git a/addons/website_sale/models/website.py b/addons/website_sale/models/website.py index f72a79bee13..d3d8ba64ee7 100644 --- a/addons/website_sale/models/website.py +++ b/addons/website_sale/models/website.py @@ -147,7 +147,7 @@ class Website(orm.Model): quotation_values = self._ecommerce_get_quotation_values(cr, uid, context=context) quotation_values['user_id'] = False quotation_values['section_id'] = self.pool.get('crm.case.section').search(cr, SUPERUSER_ID, [('code', '=', 'SPC')], context=context)[0] - quotation_values['state'] = 'shopping_cart' + # quotation_values['state'] = 'shopping_cart' return SaleOrder.create(cr, SUPERUSER_ID, quotation_values, context=context) def ecommerce_get_new_order(self, cr, uid, context=None):