OdooWiki OCA HUB

Improved Name Search

base_name_search_improved folder_open OCA/server-tools open_in_new
Uncategorized License: AGPL-3

Extends the name search feature to use additional, more relaxed matching methods, and to allow searching into configurable additional record fields.

The name search is the lookup feature to select a related record. For example, selecting a Customer on a new Sales order.

For example, typing "john brown" doesn't match "John M. Brown". The relaxed search also looks up for records containing all the words, so "John M. Brown" would be a match. It also tolerates words in a different order, so searching for "brown john" also works.

Additionally, an Administrator can configure other fields to also lookup into. For example, Customers could be additionally searched by City or Phone number.

How it works:

Regular name search is performed, and the additional search logic is only triggered if not enough results are found. This way, no overhead is added on searches that would normally yield results.

But if not enough results are found, then additional search methods are tried. The specific methods used are:

  • Try regular search on each of the additional fields
  • Try ordered word search on each of the search fields
  • Try unordered word search on each of the search fields

All results found are presented in that order, hopefully presenting them in order of relevance.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Makes Odoo's record lookup more forgiving: typing words in any order still finds the record, and administrators can add extra fields (like city or phone) to search into.

This module changes how Odoo finds records when you type in a relational field (for example, choosing a Customer on a Sales Order) and in search views. Instead of only matching the exact phrase, it can match records that contain all the words you type, regardless of their order. So "brown john" can find "John M. Brown".

Administrators configure this per model from a new menu "Smart Searches" under Settings > Technical. For each model they can enable two independent options: - Smart Search: adds a "smart_search" field to search views, so list, kanban and other views use the relaxed matching. - Smart Name Search: makes the lookup from relational fields (many2one/many2many) use the relaxed matching.

They can also define a "Smart Search Domain" to restrict which records are considered, and select "Smart Search Fields" to search into additional fields besides the record's display name. A warning is shown if more than four fields are selected or if translatable fields are chosen, to avoid performance issues.

The module touches the base model (all models) and the ir.model configuration model. It adds the smart_search field, overrides name_search and _search_display_name, and patches name_search on models where Smart Name Search is enabled. The search domain must be a valid list of tuples, otherwise a validation error is raised.

Depends on

base

Menus it adds

Smart Searches
Models and fields (2)
  • base · extends an existing modelsmart_search
  • ir.model · extends an existing modelname_search_ids (Smart Search Fields), add_smart_search, name_search_domain (Smart Search Domain), smart_search_warning, use_smart_name_search (Smart Name Search Enabled?)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 5 confirmed, 4 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 18.0

The fuzzy search is automatically enabled on all Models. Note that this only affects typing in related fields. The regular search(), used in the top right search box, is not affected.

Additional search fields can be configured at Settings \> Technical \> Database \> Models, using the "Name Search Fields" field.

Just type into any related field, such as Customer on a Sale Order.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.