[FIX] website_sale: not cached breadcrumb

Steps to reproduce:
-------------------
- go to ecommerce;
- click on "Product A";
    We see the breadcrumb: All Products / Product A
- go to shop page;
- go to the category of "Product A";
- click on "Product A";
    We see the breadcrumb: All Products / Product A
    instead of: All Products / Category / Product A

Cause:
------
The template used for the breadcrumb is cached.

Solution:
---------
Use the `t-nocache` attribute to re-evaluate this part
of the template each time it is rendered.

opw-3582971

closes odoo/odoo#144327

X-original-commit: b735269c390d2117336e29651193726ccf050636
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
This commit is contained in:
Thomas Lefebvre (thle)
2023-11-30 19:55:11 +00:00
parent 2347da9a6e
commit 0ca72f89b6
+2 -1
View File
@@ -1035,7 +1035,8 @@
<li class="breadcrumb-item o_not_editable">
<a t-att-href="keep(category=0)">All Products</a>
</li>
<li t-if="category" class="breadcrumb-item">
<li t-nocache="The category does not have to be cached, as the product can be accessed via different paths."
t-if="category" class="breadcrumb-item">
<a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name" />
</li>
<li class="breadcrumb-item active">