Remove patch web-advanced_search_startswith.diff (native in v18)
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
diff --git a/addons/web/static/src/search/filter_menu/custom_filter_item.js b/addons/web/static/src/search/filter_menu/custom_filter_item.js
|
|
||||||
index f67f5fb40af..22525b7cbfd 100644
|
|
||||||
--- a/addons/web/static/src/search/filter_menu/custom_filter_item.js
|
|
||||||
+++ b/addons/web/static/src/search/filter_menu/custom_filter_item.js
|
|
||||||
@@ -46,6 +46,8 @@ const FIELD_OPERATORS = {
|
|
||||||
char: [
|
|
||||||
{ symbol: "ilike", description: _lt("contains") },
|
|
||||||
{ symbol: "not ilike", description: _lt("doesn't contain") },
|
|
||||||
+ { symbol: "startswith", description: _lt("starts with") },
|
|
||||||
+ { symbol: "endswith", description: _lt("ends with") },
|
|
||||||
{ symbol: "=", description: _lt("is equal to") },
|
|
||||||
{ symbol: "!=", description: _lt("is not equal to") },
|
|
||||||
{ symbol: "!=", description: _lt("is set"), value: false },
|
|
||||||
@@ -257,6 +259,10 @@ export class CustomFilterItem extends Component {
|
|
||||||
[field.name, ">=", domainValue[0]],
|
|
||||||
[field.name, "<=", domainValue[1]]
|
|
||||||
);
|
|
||||||
+ } else if (operator.symbol === "startswith") {
|
|
||||||
+ domainArray.push([field.name, '=ilike', domainValue[0] + '%']);
|
|
||||||
+ } else if (operator.symbol === "endswith") {
|
|
||||||
+ domainArray.push([field.name, '=ilike', '%' + domainValue[0]]);
|
|
||||||
} else {
|
|
||||||
domainArray.push([field.name, operator.symbol, domainValue[0]]);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user