From 34cf2bc51c77bc4ed13dd300d03572b0607434b3 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Thu, 4 May 2017 11:37:28 +0200 Subject: [PATCH] [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/ --- addons/website_sale/controllers/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 8b4a1d34d0d..1e8b87fcb48 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -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'