From f478362f5286d0e6947a2dcc2958978973e598a7 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 22 Aug 2022 09:28:06 +0000 Subject: [PATCH] [FIX] website_sale: keep "sorting by" on searching by attributes Searching by attributes works via a separate form. It has a copy of other search parameters (`category`, `search`), but not `order`. STEPS 1) enable View "Products Attribute's Filters" in eCommerce 2) enable View "Show Sort by" in eCommerce 3) Set sorting to specific value 4) Change Product Filters Attribute values 5) as you can see, the sorting set in Pt3 is lost.... opw-2956280 closes odoo/odoo#98716 X-original-commit: 7e9afa3f167bd3251984c2027fb50f127bc002c2 Signed-off-by: Ivan Elizaryev (iel) Signed-off-by: William Braeckman (wbr) --- addons/website_sale/controllers/main.py | 1 + addons/website_sale/views/templates.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 09c70c1b190..b1aad046294 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -417,6 +417,7 @@ class WebsiteSale(http.Controller): values = { 'search': fuzzy_search_term or search, 'original_search': fuzzy_search_term and search, + 'order': post.get('order', ''), 'category': category, 'attrib_values': attrib_values, 'attrib_set': attrib_set, diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 43549d3bc16..8d406dc5a68 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -514,6 +514,7 @@
+ Clear Filters×