From d8083b42704b3a5eb7f21ccd743a8265787f6caa Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 4 Jul 2017 14:33:58 +0200 Subject: [PATCH] [FIX] website_sale: use the same price for all routes The route /shop and /shop/product did not used the same context. The partner is set in the shop but not in the product page which may lead to a different pricelist to be applied. opw-746729 --- addons/website_sale/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index fe963bc5b7e..4df7d5dbb98 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -268,7 +268,9 @@ class WebsiteSale(http.Controller): @http.route(['/shop/product/'], type='http', auth="public", website=True) def product(self, product, category='', search='', **kwargs): - product_context = dict(request.env.context, active_id=product.id) + product_context = dict(request.env.context, + active_id=product.id, + partner=request.env.user.partner_id) ProductCategory = request.env['product.public.category'] Rating = request.env['rating.rating']