OdooWiki OCA HUB

Add custom filters for fields via UI

base_search_custom_field_filter folder_open OCA/server-ux open_in_new
Usability License: AGPL-3

This module allows to define custom filters in the search views for an specific field belonging to the document or any other related document.

This nature makes the definition quite technical, but once done, it adds the element in the UI for regular user use.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Lets administrators add extra search filters to any Odoo screen without coding, by defining a field (or a related field path) in a simple list. Regular users then see these filters in the search bar of that screen.

This module adds a configuration screen where an administrator can create extra search filters for any model in Odoo, without writing code.

Where it appears: a new "Custom Field Filters" menu (under the Settings area) opens an editable list. Each line defines one filter with: the model it applies to, the label shown to users, the field expression to filter on, an optional "position after" field to control where the filter appears, and a sequence for ordering.

Business rules and automatic behaviours: - The expression is checked: it must point to a real field, and it can follow a path through related records (for example a field reached through another model). An invalid expression is rejected with an error. - Filter labels must be unique per model, and the same expression cannot be defined twice for the same model. - When a search view is loaded, the defined filters are automatically inserted into it, after the chosen field or at the end if that field is not found. - The filter fields are exposed to the interface as non-stored, non-sortable and non-selectable, so they only serve as search filters.

Who can do what: all internal users can read the filter definitions; only administrators (system group) can create, edit or delete them.

It touches the shared base model used by every screen, and stores its settings in ir.ui.custom.field.filter.

Depends on

web

Required by other modules

Menus it adds

menu_ir_ui_custom_field_filter
Models and fields (2)
  • base · extends an existing model
  • ir.ui.custom.field.filter · new modelname, model_id, sequence, expression, model_name (Model name), position_after

Text generated by AI (DeepSeek) from reading the Odoo 19.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: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/server-ux.

terminal Installation and usage

OCA documentation · Odoo 19.0
  • Go to Settings \> Technical \> User Interface \> Custom Field Filters.
  • Create a new record, and define following information:
  • The Model for which you are defining the filter. It will appear in all the search views of this model.
  • The label you want to see on the search line on the Name field. This field allows translations for proper UI in different languages.
  • The Expression, which is the field chain string with dot notation. Examples: product_id, product_id.seller_ids.name, partner_id.lang.
  • Optionally, you can fill Position After for indicating after which existing field (technical name) the filter will appear. If empty or not found, the filter will be added at the end.
  • You can reorder records for determining sorting for multiple filters for the same model with the arrow handle in the left part.
  • Go to the menu entry for which you have defined the custom field filter.
  • On the search bar, type anything.
  • In the filter list, you will see the line for the element you have defined.

As demo data, a custom field filter is included for sample purposes:

Steps for trying this sample:

  • Install contacts module.
  • Go to Contacts.
  • Type "english" and you'll find the filter "Language" at the end:

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.