OdooWiki OCA HUB

Filter Button

web_filter_header_button folder_open OCA/web open_in_new
Server UX License: AGPL-3

This module allows to add some selected filters as buttons in the header control panel.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Lets you turn selected filters and group-by options into clickable buttons shown in the control panel header, so common filters are one click away instead of hidden in the search dropdown.

This module adds a filter button area to the top control panel of list, kanban and other non-form views. Filters that have been flagged in their definition appear as buttons, and a small filter icon button in the header shows or hides this button bar. The choice of visible or hidden is remembered per user and per action in the browser, so it stays the way you left it.

  • Each button toggles its filter on or off with one click; active buttons are filled with colour, inactive ones are outlined.
  • A reset button (cross icon) clears all current filters at once.
  • Buttons can show an icon, a custom label and a keyboard shortcut, and are colour-coded by kind: filters in blue, favourites in orange, group-by in light blue.
  • Field-type filters are excluded, since they are meant for free-text searching rather than one-click toggling.
  • Group-by filters can also be promoted to buttons when they are flagged accordingly.

The module works on the search and control panel components (SearchModel, ControlPanel, SearchArchParser) and does not add any new database model. The included demo view shows how the Installed, Not installed and State filters of the Apps list can be turned into header buttons with icons and hotkeys.

Depends on

web

Required by other modules

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: 3 confirmed, 6 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0

To show a filter in the header of the views, it should have the a context attribute with the key shown_in_panel.

<filter
    string="My filter"
    name="my_filter"
    domain="[('active', '!=', False)]"
    context="{'shown_in_panel': True}"
>

This will show the filter in the header with its name. You can customize the button adding an icon or with a custom name passing an object to that key:

{'shown_in_panel': {'icon': 'fa-thumbs-up', 'name': 'Ok'}}

You might be interested in leaving just the icon. In that case, set an empty string on the name property:

{'shown_in_panel': {'icon': 'fa-thumbs-up', 'name': ''}}

You could also want to add a hotkey. In such case add the hotkey property:

{'shown_in_panel': {'icon': 'fa-thumbs-up', 'hotkey': 'F'}}

You can show filter, groups or even favorites.

In a search view with header filter buttons, you'll see a filter icon (funnel). Use it to unfold the filters.

There's a demo implementation in Apps and you can play around following the Configure section.

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.