What Is the Search Panel?
The search panel is a sidebar filter panel that appears on the left side of list and kanban views. It provides persistent, visual filtering — similar to category navigation in e-commerce sites. Users click categories or checkboxes to filter records without typing search queries.
<search>
<searchpanel>
<field name="categ_id" icon="fa-th-list" enable_counters="1"/>
<field name="state" select="multi" icon="fa-filter" enable_counters="1"/>
</searchpanel>
</search>Selection Modes
| Mode | Attribute | Behavior |
|---|---|---|
| Single select | (default) | Click one category at a time, like radio buttons |
| Multi select | select="multi" | Check multiple values, like checkboxes |
Single select is best for categories (one active at a time). Multi select is best for tags, states, or any field where users want to combine filters.
Basic Configuration
<search>
<!-- Regular search fields -->
<field name="name"/>
<field name="partner_id"/>
<!-- Search panel (sidebar) -->
<searchpanel>
<!-- Category: single select, hierarchical -->
<field name="categ_id" icon="fa-th-list" enable_counters="1"/>
<!-- Tags: multi select -->
<field name="tag_ids" select="multi" icon="fa-tags" enable_counters="1"/>
<!-- State: multi select -->
<field name="state" select="multi" icon="fa-filter" enable_counters="1"/>
</searchpanel>
</search>enable_counters
The enable_counters="1" attribute shows the count of matching records next to each filter option. This helps users see at a glance how many records match each category:
Product Category
All (150)
Electronics (45)
Furniture (32)
Clothing (73)Without counters, users cannot tell if a category has records without clicking it. Always enable counters unless performance is a concern (large datasets with many categories).
Hierarchical Categories
For Many2one fields that have a parent_id (hierarchical models), the search panel automatically shows a tree structure:
<!-- product.category has parent_id, so it shows as a tree -->
<field name="categ_id" icon="fa-th-list" enable_counters="1"/>
<!-- Renders as:
All
Electronics
Computers
Laptops
Desktops
Phones
Furniture
Chairs
Tables
-->Clicking a parent category shows records from all child categories too.
Custom Search Panel on Specific Views
Search panels are defined in the search view. To add a search panel to a specific list/kanban view, create or inherit the model's search view:
<record id="view_product_search_panel" model="ir.ui.view">
<field name="name">product.template.search.panel</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<search position="inside">
<searchpanel>
<field name="categ_id" icon="fa-th-list"
enable_counters="1" limit="200"/>
<field name="type" select="multi"
icon="fa-cubes" enable_counters="1"/>
</searchpanel>
</search>
</field>
</record>Search Panel with Grouped Data
You can group search panel options by another field:
<searchpanel>
<field name="user_id" select="multi"
groupby="team_id" enable_counters="1"/>
</searchpanel>
<!-- Renders as:
Sales Team Alpha
[ ] John
[ ] Jane
Sales Team Beta
[ ] Bob
[ ] Alice
-->Limit and Performance
For models with thousands of category values, the search panel can be slow. Use the limit attribute:
<field name="partner_id" select="multi" enable_counters="1" limit="100"/>This limits the number of options shown. If there are more values than the limit, the search panel shows a "Too many items" message.
Search Panel on Kanban Views
Search panels work on both list and kanban views. On kanban, they provide category navigation alongside the card layout:
<!-- The search panel is defined in the search view, not the kanban view -->
<!-- It automatically appears when viewing the model in kanban mode -->
<!-- Action that shows kanban with search panel -->
<record id="action_products_with_panel" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_product_search_panel"/>
</record>Color-Coded Options
For Many2many fields with a color attribute (like tags), the search panel can show colored indicators:
<field name="tag_ids" select="multi"
icon="fa-tags" enable_counters="1"
color_field="color"/>Limitations
- Search panels work in list (tree) and kanban views only — not in form, pivot, or graph views
- Only stored fields can be used — computed non-stored fields are not supported
- Counters add a query per panel field, which can slow down large datasets
- Maximum one single-select (category) field recommended — multiple categories confuse users
- The panel takes horizontal space — on small screens it can feel cramped
Best Practices
- Use one category field (single select) for primary navigation
- Use multi-select for tags, states, or any combinable filter
- Always enable counters for user-facing views
- Set reasonable limits (50-200) for fields with many values
- Combine search panel with search filters for power users
- Test with production data volumes to catch performance issues