From 05ddaf2441b47ee1c0b41c9502bfded9591314c8 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Fri, 25 Oct 2024 09:59:06 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=20website=5Fsale=5Fproduct=5Fattribute=5F?= =?UTF-8?q?value=5Ffilter=5Fexisting:=20Add=20attribute=20=E2=80=98Test=20?= =?UTF-8?q?yellow'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is being checked that the attribute ‘Test yellow’ is not present in the filter panel as it is not being used in any product. Actually, no real check is being made if the attribute is not defined. It is a fact, if it is not defined, it does not exist and will not be present at all. --- ...est_website_sale_product_attribute_value_filter_existing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website_sale_product_attribute_value_filter_existing/tests/test_website_sale_product_attribute_value_filter_existing.py b/website_sale_product_attribute_value_filter_existing/tests/test_website_sale_product_attribute_value_filter_existing.py index 50e0c1ef4e..47c40d45d7 100644 --- a/website_sale_product_attribute_value_filter_existing/tests/test_website_sale_product_attribute_value_filter_existing.py +++ b/website_sale_product_attribute_value_filter_existing/tests/test_website_sale_product_attribute_value_filter_existing.py @@ -28,6 +28,9 @@ def setUpClass(cls): cls.product_attribute_value_blue = ProductAttributeValue.create( {"name": "Test blue", "attribute_id": cls.product_attribute.id} ) + cls.product_attribute_value_yellow = ProductAttributeValue.create( + {"name": "Test yellow", "attribute_id": cls.product_attribute.id} + ) cls.product_template = cls.env.ref("product.product_product_4_product_template") cls.product_attribute_line = ProductAttributeLine.create( {