diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 79eb0a12ef417..8be12e71c02cf 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -755,16 +755,16 @@ def cart(self, access_token=None, revive='', **post): 'date': fields.Date.today(), 'suggested_products': [], }) + if post.get('type') == 'popover': + # force no-cache so IE11 doesn't cache this XHR + return request.render("website_sale.cart_popover", values, headers={'Cache-Control': 'no-cache'}) + if order: values.update(order._get_website_sale_extra_values()) order.order_line.filtered(lambda l: not l.product_id.active).unlink() values['suggested_products'] = order._cart_accessories() values.update(self._get_express_shop_payment_values(order)) - if post.get('type') == 'popover': - # force no-cache so IE11 doesn't cache this XHR - return request.render("website_sale.cart_popover", values, headers={'Cache-Control': 'no-cache'}) - return request.render("website_sale.cart", values) @http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True)