[FIX] website_sale: Pass website_sale_order to the template on each checkout step

The template `wizard_checkout` uses the `website_sale_order` to render the checkout process pages

But this values isn't passed to the template on these staps:
- /shop/checkout/
- /shop/address/
This commit is contained in:
Yannick Tivisse
2017-05-04 11:46:53 +02:00
parent 6d392d97a0
commit 34cf2bc51c
+3
View File
@@ -599,6 +599,7 @@ class WebsiteSale(http.Controller):
country = 'country_id' in values and values['country_id'] != '' and request.env['res.country'].browse(int(values['country_id']))
country = country and country.exists() or def_country_id
render_values = {
'website_sale_order': order,
'partner_id': partner_id,
'mode': mode,
'checkout': values,
@@ -627,6 +628,8 @@ class WebsiteSale(http.Controller):
values = self.checkout_values(**post)
values.update({'website_sale_order': order})
# Avoid useless rendering if called in ajax
if post.get('xhr'):
return 'ok'