From 7cf1a95a85459883f74b7876b00b4be3fea25bb6 Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Thu, 28 Apr 2022 08:47:47 +0000 Subject: [PATCH] [IMP] website: make configurator industry search case-insensitive Since [1] synonyms entered on IAP had to be lower-case to be matched by the industry auto-complete. After this commit the client-side of the configurator makes sure labels and synonyms are matched without case sensitivity. Steps to reproduce: - Add an upper-case synonym on IAP - Create a new website - Search for added synonym => Industry associated with synonym did not show up. [1]: https://github.com/odoo/odoo/commit/5d5d5d75d52a2a9e0d12bdb6442e006327ba9b0c task-2835608 closes odoo/odoo#92419 X-original-commit: 1385a20c7ce22d2a68fa5d76ca8e34e4c679d402 Signed-off-by: Romain Derie (rde) --- .../website/static/src/components/configurator/configurator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/components/configurator/configurator.js b/addons/website/static/src/components/configurator/configurator.js index a4cf67bd810..6e128184ecd 100644 --- a/addons/website/static/src/components/configurator/configurator.js +++ b/addons/website/static/src/components/configurator/configurator.js @@ -198,7 +198,7 @@ class DescriptionScreen extends Component { // To match, every term should be contained in either the label or a // synonym for (const candidate of [val.label, ...(val.synonyms || '').split(/[|,\n]+/)]) { - if (terms.every(term => candidate.includes(term))) { + if (terms.every(term => candidate.toLowerCase().includes(term))) { return true; } }