From 2d24b42fd34d1c375647c04591fdb7ca50f2b459 Mon Sep 17 00:00:00 2001 From: Jordi Toledo Date: Mon, 31 Jul 2023 08:45:06 +0200 Subject: [PATCH] [15.0][FIX] web_search_with_and When we search by the id of any record and not a string, it gives an error on the line: ? source.value.trim(). It is because the value of sorce.value is an integer. To fix it, we do the trim() operation just if source.value is an string. --- web_search_with_and/static/src/js/search_bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_search_with_and/static/src/js/search_bar.js b/web_search_with_and/static/src/js/search_bar.js index bbab91bd4..69af0569f 100644 --- a/web_search_with_and/static/src/js/search_bar.js +++ b/web_search_with_and/static/src/js/search_bar.js @@ -27,8 +27,8 @@ odoo.define("web_search_with_and/static/src/js/search_bar.js", function (require filterId: source.filterId, value: "value" in source - ? source.value.trim() - : this._parseWithSource(labelValue, source).trim(), + ? source.value + : this._parseWithSource(labelValue.trim(), source), label: labelValue.trim(), operator: source.filterOperator || source.operator, isShiftKey: this.isShiftKey,