From 9878fdd88c709e7d6a381359f35eee1da63cd728 Mon Sep 17 00:00:00 2001 From: Richard deMeester Date: Thu, 15 Jun 2023 10:22:03 +1000 Subject: [PATCH] [14.0] web_search_and - Make functional again Fixes breaking change introduced at #1976. --- .../src/js/control_panel_model_extension.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/web_search_with_and/static/src/js/control_panel_model_extension.js b/web_search_with_and/static/src/js/control_panel_model_extension.js index 70cb547c4..9e848115c 100644 --- a/web_search_with_and/static/src/js/control_panel_model_extension.js +++ b/web_search_with_and/static/src/js/control_panel_model_extension.js @@ -26,19 +26,20 @@ odoo.define( queryElem_val.operator === operator ); if (!queryElem) { - const {groupId} = this.state.filters[filterId]; - this.state.query.push({ - filterId, - groupId, - label, - value, - operator, - }); if (isShiftKey) { - const group_id = Math.random(); + const groupId = Math.random(); this.state.query.push({ filterId, - group_id, + groupId, + label, + value, + operator, + }); + } else { + const {groupId} = this.state.filters[filterId]; + this.state.query.push({ + filterId, + groupId, label, value, operator,