Skip to content
Snippets Groups Projects
Commit e81e423a authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] website_sale: modify template if fiscal position changes


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: default avatarThomas Lefebvre (thle) <thle@odoo.com>
parent 324e1387
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment