[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:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user