From 802b4c547e48a9dcd84c1eabd15e60ec3c1a94b7 Mon Sep 17 00:00:00 2001 From: "Thomas Lefebvre (thle)" Date: Thu, 2 Nov 2023 08:56:34 +0100 Subject: [PATCH] [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) Signed-off-by: Thomas Lefebvre (thle) --- addons/website_sale/i18n/website_sale.pot | 2 +- addons/website_sale/views/templates.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/i18n/website_sale.pot b/addons/website_sale/i18n/website_sale.pot index c3d3c37e9bd..4ea43f31597 100644 --- a/addons/website_sale/i18n/website_sale.pot +++ b/addons/website_sale/i18n/website_sale.pot @@ -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 diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 011d21eadba..97c245f8ba4 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -412,7 +412,7 @@

No product defined

-

No product defined in category "".

+

No product defined in this category.

No results