From 09c53d8eee0a58b5b5e7b35cf2655a6e0f83d7d0 Mon Sep 17 00:00:00 2001 From: William Braeckman Date: Thu, 6 Oct 2022 13:41:03 +0000 Subject: [PATCH] [FIX] website_sale: fix offcanvas bubble The bubble is showed whenever a filter is activated and/or a price range is selected in the filters. However due to float precision the comparison made to check whether there is a price filter could be wrong when using "weird" numbers. TaskId-3009210 closes odoo/odoo#102507 X-original-commit: 9359a5b5f0f72550d69671f975da23d4734b490f Signed-off-by: William Braeckman (wbr) --- addons/website_sale/controllers/main.py | 1 + addons/website_sale/views/templates.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index d5a37096bf8..c86bdc60906 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -466,6 +466,7 @@ class WebsiteSale(http.Controller): 'layout_mode': layout_mode, 'products_prices': products_prices, 'get_product_prices': lambda product: lazy(lambda: products_prices[product.id]), + 'float_round': tools.float_round, } if filter_by_price_enabled: values['min_price'] = min_price or available_min_price diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 7d9d9061a26..d0e50c64f68 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -283,7 +283,7 @@ - +