Improved Name Search

base_name_search_improved
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/18.0/base_name_search_improved
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
COMMITTERS
COMMITTERSStefan Rijnhart, Weblate, OCA-git-bot, oca-ci, Franco Leyes
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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.

![image0](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image0.png)

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

![image2](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image2.png)

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.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_model_form_new view.model.form ir.model form New
view_model_search view.model.search ir.model search New
view_model_tree view.model.list ir.model list New
Models touched (2)

New fields (1)
  • smart_search Char
    compute='_compute_smart_search' search='_search_smart_search' translate=False
Public methods (1)
  • name_search(self, name='', args=None, operator='ilike', limit=100)
    @api.model

New fields (5)
  • add_smart_search Boolean
    help='Add Smart Search on search views'
  • name_search_domain Char
    string='Smart Search Domain'
  • name_search_ids Many2many → ir.model.fields
    string='Smart Search Fields' args: 'ir.model.fields'
  • smart_search_warning Html
    compute='_compute_smart_search_warning'
  • use_smart_name_search Boolean
    help="Use Smart Search for 'name_search', this will affect when searching from other records (for eg. from m2o fields" string='Smart Name Search Enabled?'
Public methods (3)
  • check_name_search_domain(self)
    @api.constrains('name_search_domain')
  • update_search_wo_restart(self)
    @api.constrains('name_search_ids', 'name_search_domain', 'add_smart_search')
  • write(self, vals)
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/17.0/base_name_search_improved
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
COMMITTERS
COMMITTERSWeblate, oca-ci, Rocío Vega
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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.

![image0](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image0.png)

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

![image2](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image2.png)

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.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_model_form_new view.model.form ir.model form New
view_model_search view.model.search ir.model search New
view_model_tree view.model.tree ir.model tree New
Models touched (2)

New fields (1)
  • smart_search Char
    compute='_compute_smart_search' search='_search_smart_search' translate=False
Public methods (0)

No public methods.

New fields (5)
  • add_smart_search Boolean
    help='Add Smart Search on search views'
  • name_search_domain Char
    string='Smart Search Domain'
  • name_search_ids Many2many → ir.model.fields
    string='Smart Search Fields' args: 'ir.model.fields'
  • smart_search_warning Html
    compute='_compute_smart_search_warning'
  • use_smart_name_search Boolean
    help="Use Smart Search for 'name_search', this will affect when searching from other records (for eg. from m2o fields" string='Smart Name Search Enabled?'
Public methods (2)
  • check_name_search_domain(self)
    @api.constrains('name_search_domain')
  • update_search_wo_restart(self)
    @api.constrains('name_search_ids', 'name_search_domain', 'add_smart_search')
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/16.0/base_name_search_improved
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
COMMITTERS
COMMITTERSStefan Rijnhart, Weblate, OCA-git-bot, Quentin Dupont, oca-ci, Martin Quinteros, filoquin
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:53
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_model_form_new view.model.form ir.model form New
view_model_search view.model.search ir.model search New
view_model_tree view.model.tree ir.model tree New
Models touched (2)

New fields (1)
  • smart_search Char
    compute='_compute_smart_search' search='_search_smart_search'
Public methods (0)

No public methods.

New fields (5)
  • add_smart_search Boolean
    help='Add Smart Search on search views'
  • name_search_domain Char
    string='Smart Search Domain'
  • name_search_ids Many2many → ir.model.fields
    string='Smart Search Fields' args: 'ir.model.fields'
  • smart_search_warning Html
    compute='_compute_smart_search_warning'
  • use_smart_name_search Boolean
    help="Use Smart Search for 'name_search', this will affect when searching from other records (for eg. from m2o fields" string='Smart Name Search Enabled?'
Public methods (2)
  • check_name_search_domain(self)
    @api.constrains('name_search_domain')
  • update_search_wo_restart(self)
    @api.constrains('name_search_ids', 'name_search_domain', 'add_smart_search')
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/14.0/base_name_search_improved
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, OCA-git-bot, David, oca-ci, Kitti U, Rad0van
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_model_form_new view.model.form ir.model form New
view_model_search view.model.search ir.model search New
view_model_tree view.model.tree ir.model tree New
Models touched (2)

New fields (1)
  • smart_search Char
    compute='_compute_smart_search' search='_search_smart_search'
Public methods (0)

No public methods.

New fields (5)
  • add_smart_search Boolean
    help='Add Smart Search on search views'
  • name_search_domain Char
    string='Smart Search Domain'
  • name_search_ids Many2many → ir.model.fields
    string='Smart Search Fields' args: 'ir.model.fields'
  • smart_search_warning Html
    compute='_compute_smart_search_warning'
  • use_smart_name_search Boolean
    help="Use Smart Search for 'name_search', this will affect when searching from other records (for eg. from m2o fields" string='Smart Name Search Enabled?'
Public methods (2)
  • check_name_search_domain(self)
    @api.constrains('name_search_domain')
  • update_search_wo_restart(self)
    @api.constrains('name_search_ids', 'name_search_domain', 'add_smart_search')
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/13.0/base_name_search_improved
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ADHOC SA, Daniel Reis
COMMITTERS
COMMITTERSStefan Rijnhart, OCA Transbot, Juan Jose Scarafia, oca-travis, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_model_form_new view.model.form ir.model form New
view_model_search view.model.search ir.model search New
view_model_tree view.model.tree ir.model tree New
Models touched (2)

New fields (1)
  • smart_search Char
    compute='_compute_smart_search' search='_search_smart_search'
Public methods (0)

No public methods.

New fields (5)
  • add_smart_search Boolean
    help='Add Smart Search on search views'
  • name_search_domain Char
    string='Smart Search Domain'
  • name_search_ids Many2many → ir.model.fields
    string='Smart Search Fields' args: 'ir.model.fields'
  • smart_search_warning Html
    compute='_compute_smart_search_warning'
  • use_smart_name_search Boolean
    help="Use Smart Search for 'name_search', this will affect when searching from other records (for eg. from m2o fields" string='Smart Name Search Enabled?'
Public methods (2)
  • check_name_search_domain(self)
    @api.constrains('name_search_domain')
  • update_search_wo_restart(self)
    @api.constrains('name_search_ids', 'name_search_domain', 'add_smart_search')
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/11.0/base_name_search_improved
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Daniel Reis
COMMITTERS
COMMITTERSKatherine Zaoral, OCA Transbot, oca-travis, OCA-git-bot, OCA Git Bot, Jesus Ramoneda
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_model_form Add Name Searchable to Models ir.model field Inherits base.view_model_form
Models touched (1)

New fields (1)
  • name_search_ids Many2many → ir.model.fields
    string='Name Search Fields' args: 'ir.model.fields'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/9.0/base_name_search_improved
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Daniel Reis
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Nicolas Mac Rouillon
WEBSITE
WEBSITEhttps://odoo-community.org/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_model_form Add Name Searchable to Models ir.model field Inherits base.view_model_form
Models touched (1)

New fields (1)
  • name_search_ids Many2many → ir.model.fields
    string='Name Search Fields' args: 'ir.model.fields'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/8.0/base_name_search_improved
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Daniel Reis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Daniel Reis
COMMITTERS
COMMITTERSYannick Vaucher, Holger Brunn, Daniel Reis, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis, Tom Blauwendraat, Raph
WEBSITE
WEBSITEhttps://odoo-community.org/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_model_form Add Name Searchable to Models ir.model field Inherits base.view_model_form
Models touched (1)

New fields (2)
  • name_search_ids Many2many → ir.model.fields
    string='Name Search Fields' args: 'ir.model.fields'
  • name_search_use_standard Boolean
    default=True help='First try to find matches with the standard search' args: 'Use standard search'
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/server-tools
PULL REQUEST
PULL REQUEST[19.0][MIG] base_name_search_improved: Migration to 19.0 (#3580)