[FIX] website_sale: Price of accessory product are all time null. Need to use new api to send the context.

This commit is contained in:
Christophe Matthieu 2014-09-10 10:30:25 +02:00
parent 5064c5b1a5
commit b2f3de6da7
1 changed files with 3 additions and 2 deletions

View File

@ -298,9 +298,10 @@ class website_sale(http.Controller):
'suggested_products': [],
}
if order:
_order = order
if not context.get('pricelist'):
context['pricelist'] = order.pricelist_id.id
values['suggested_products'] = order._cart_accessories(context=context)
_order = order.with_context(pricelist=order.pricelist_id.id)
values['suggested_products'] = _order._cart_accessories()
return request.website.render("website_sale.cart", values)