-
Thomas Lefebvre (thle) authored
Steps to reproduce: ------------------- - Without going to the shop first, login with a user who triggers a different fiscal position and pricelist than the public user. - In another browser tab (incognito or separate tab), go to the shop with the public user. - Select the pricelist previously used by the user in the other session. Issue: ------ We obtain the prices for the other user's fiscal position. Cause: ------ When we login with a user who triggers a fiscal position mapping and go to the `/shop` page, `products_prices` will be frozen with values calculated with the fiscal position (via `_get_sales_prices`). If we change our fiscal position, but use a template that contains the same `t-cache` key, we won't re-evaluate the template. As a result, it is possible to obtain values calculated for another fiscal position. Solution: --------- As the template values take into account the fiscal position, we need to add a `t-cache` key to identify this fiscal position. opw-3316153 closes odoo/odoo#133949 Signed-off-by:
Thomas Lefebvre (thle) <thle@odoo.com>
Thomas Lefebvre (thle) authoredSteps to reproduce: ------------------- - Without going to the shop first, login with a user who triggers a different fiscal position and pricelist than the public user. - In another browser tab (incognito or separate tab), go to the shop with the public user. - Select the pricelist previously used by the user in the other session. Issue: ------ We obtain the prices for the other user's fiscal position. Cause: ------ When we login with a user who triggers a fiscal position mapping and go to the `/shop` page, `products_prices` will be frozen with values calculated with the fiscal position (via `_get_sales_prices`). If we change our fiscal position, but use a template that contains the same `t-cache` key, we won't re-evaluate the template. As a result, it is possible to obtain values calculated for another fiscal position. Solution: --------- As the template values take into account the fiscal position, we need to add a `t-cache` key to identify this fiscal position. opw-3316153 closes odoo/odoo#133949 Signed-off-by:
Thomas Lefebvre (thle) <thle@odoo.com>