Skip to content
Snippets Groups Projects
Commit 7d2bc7d3 authored by Yoshi Tashiro's avatar Yoshi Tashiro Committed by Romain Derie
Browse files

[FIX] website_sale: reset cart if checkout was done in another session

This commit extend commit https://github.com/odoo/odoo/commit/ef48b81ab127dd717a4a9d106edd5c51121bc8f7
When you have a cart on multiple session and confirm the card in one of them,
you could still access your cart from other session (note that you could not do
anything with it as it would be reset when adding product or changing qty).

Closes #28210
parent 3457d1a7
Branches
Tags
No related merge requests found
......@@ -341,6 +341,9 @@ class WebsiteSale(http.Controller):
@http.route(['/shop/cart'], type='http', auth="public", website=True)
def cart(self, **post):
order = request.website.sale_get_order()
if order and order.state != 'draft':
request.session['sale_order_id'] = None
order = request.website.sale_get_order()
if order:
from_currency = order.company_id.currency_id
to_currency = order.pricelist_id.currency_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment