[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.
pull/2578/head
Jordi Toledo 2023-07-31 08:45:06 +02:00
parent 436d2cab3c
commit 2d24b42fd3
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ odoo.define("web_search_with_and/static/src/js/search_bar.js", function (require
filterId: source.filterId, filterId: source.filterId,
value: value:
"value" in source "value" in source
? source.value.trim() ? source.value
: this._parseWithSource(labelValue, source).trim(), : this._parseWithSource(labelValue.trim(), source),
label: labelValue.trim(), label: labelValue.trim(),
operator: source.filterOperator || source.operator, operator: source.filterOperator || source.operator,
isShiftKey: this.isShiftKey, isShiftKey: this.isShiftKey,