Skip to content

17.0-20240812

Compare
Choose a tag to compare
@osimallen osimallen released this 12 Aug 16:25
· 1160 commits to 17.0 since this release
[FIX] website_sale: properly set session variable

To reproduce the bug:
- Add extra step during checkout
- Make Sign in/up at check out Mandatory
- Add a non-service product to the cart without being logged in and proceed to checkout
- Create an account and once logged in continue the checkout process normally until payment is done

When the process is done, a request is sent to /shop/payment/validate, and we get a server error message since we try to
fetch `sale_last_order_id` from the session but it's not set.

To simplify, the buying process goes like this: cart > [sign in/up] > [delivery] > checkout > extra_step or confirm_order
> payment. The issue is that `sale_last_order_id` is set in confirm_order, which we don't pass through if we have
extra_step enabled. To fix that, I moved the set operation a step earlier.

opw-3988807

closes odoo/odoo#174638

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>