From 1f16c2aabebadcb68dea6e706a2cb5a7b923bf07 Mon Sep 17 00:00:00 2001 From: Emmie He Date: Wed, 24 Oct 2018 17:40:34 +0000 Subject: [PATCH] [FIX] website_sale: make extra step work in cart checkout In v11, when we add the extra step in website checkout and then click 'proceed to checkout', user will be directed to address (even when there is default address detected), and then extra step, and in the end confirmation. But in v12, when extra step is enabled, user will be sent directly to confirmation after clicking 'proceed to checkout'. They can click 'extra info' to fill out the information, but I imagine user would easily ignore that option. It seems the express checkout implementation ignored extra_info route. closes odoo/odoo#28122 --- addons/website_sale/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index af7000eea05..79b4618b09b 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -706,9 +706,9 @@ class WebsiteSale(ProductConfiguratorController): order.order_line._compute_tax_id() request.session['sale_last_order_id'] = order.id request.website.sale_get_order(update_pricelist=True) - extra_step = request.env.ref('website_sale.extra_info_option') + extra_step = request.env['ir.ui.view']._view_obj('website_sale.extra_info_option') if extra_step.active: - return request.redirect("/shop/confirm_order") + return request.redirect("/shop/extra_info") return request.redirect("/shop/payment")