[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
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user