[FIX] website_sale: remove category name

Steps to reproduce:
-------------------
- create several product categories on the ecommerce;
- do not add products to these categories
- go on a category;
- go on an other category;

Issue:
------
The message is the same for both categories:
```
No product defined in category "First Category".
```

Cause:
------
When we go to the first category, the template is cached
according to the existing `t-cache` key containing the products.
In this case, we have no products.

When we go to the second category, which has no products,
the current `t-cache` key doesn't detect changes and therefore
uses the cached template from the first category.

Solution:
---------
Remove the category name because adding `category` to existing
`t-cache` key to detect a difference between categories
that may have the same t-cache key would add
complexity to the key and have a cost in terms of performance.

opw-3572953

closes odoo/odoo#142595

X-original-commit: b1eba0972de2adbfcc0b6fe40252db5a7fcf74f9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
This commit is contained in:
Thomas Lefebvre (thle)
2023-11-20 11:13:28 +00:00
parent 35887ca4cf
commit 802b4c547e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2368,7 +2368,7 @@ msgstr ""
#. module: website_sale
#: model_terms:ir.ui.view,arch_db:website_sale.products
msgid "No product defined in category \""
msgid "No product defined in this category."
msgstr ""
#. module: website_sale
+1 -1
View File
@@ -412,7 +412,7 @@
<div t-else="" class="text-center text-muted mt128 mb256">
<t t-if="not search">
<h3 class="mt8">No product defined</h3>
<p t-if="category">No product defined in category "<strong t-esc="category.display_name"/>".</p>
<p t-if="category">No product defined in this category.</p>
</t>
<t t-else="">
<h3 class="mt8">No results</h3>