From d9f65b96fc3260239dafb4312fab49fb76a0550c Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 26 May 2025 11:47:26 +0200 Subject: [PATCH] Remove patch web-advanced_search_startswith.diff (native in v18) --- .../web-advanced_search_startswith.diff | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 base_usability_akretion/web-advanced_search_startswith.diff diff --git a/base_usability_akretion/web-advanced_search_startswith.diff b/base_usability_akretion/web-advanced_search_startswith.diff deleted file mode 100644 index f9d15cd..0000000 --- a/base_usability_akretion/web-advanced_search_startswith.diff +++ /dev/null @@ -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]]); - }