[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
This commit is contained in:
Martin Trigaux
2017-07-04 14:39:25 +02:00
parent 657e328903
commit d8083b4270
+3 -1
View File
@@ -268,7 +268,9 @@ class WebsiteSale(http.Controller):
@http.route(['/shop/product/<model("product.template"):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']