-
- Downloads
[FIX] website_sale: clear old pricelist in the session
On the ecommerce, we want the pricelist to be adapted to the user who is connected. If no user is logged in, the 'Public Pricelist' is used. To determine the pricelist that will be used (by default): https://github.com/odoo/odoo/blob/a3169ede4f609b56c83da04756d20b1c7a07251f/addons/website_sale/controllers/main.py#L350-L354 Therefore, if we have been to the shop as a 'Public user' and we decide to log in, we already have a pricelist in `request.session.get('website_sale_current_pl')`. So we have to clear the pricelist when we connect to determine the new pricelist of the user. opw-3228998 closes odoo/odoo#118880 Signed-off-by:Lefebvre Thomas (thle) <thle@odoo.com>
Showing
- addons/website_sale/controllers/main.py 7 additions, 0 deletionsaddons/website_sale/controllers/main.py
- addons/website_sale/static/tests/tours/website_sale_shop_pricelist_tour.js 35 additions, 0 deletions...le/static/tests/tours/website_sale_shop_pricelist_tour.js
- addons/website_sale/tests/test_website_sale_pricelist.py 22 additions, 0 deletionsaddons/website_sale/tests/test_website_sale_pricelist.py
Loading
Please register or sign in to comment