How Custom Filters Enhance User Experience in the Odoo19 Website Portal

FARHA
December 22, 2025
Illustration showing how custom filters enhanc1e user experience in the Odoo9 website portal

The Odoo Website module has a strong Customer Portal that helps users get to important documents like quotes, sales orders, invoices, and other records right from the website. But as the number of records in the portal grows it can take a long time and be difficult to find specific information without the right tools to make it easier to get around.

Adding filtering options to portal pages is a very effective way to make them easier to use and faster. Users can quickly narrow down the records using filters based on relevant criteria. This makes it easier to work with large datasets and you can also learn how to add custom filters to an Odoo19 website portal by using the My Time Off menu item as an example in this blog.

Custom filters enhancing user experience in Odoo 19 website portal

STEP 1 – Add a Custom Menu to the Portal

First you need to add a custom menu to the Portal view. To add the My Time Off custom menu to the Portal view you need the XML file below.

Odoo19 portal interface optimized with advanced filtering options
  • The above template extends the portal navigation by introducing a breadcrumb labeled My Time Off.
  • It dynamically detects when the user is on the my_timeoff page and marks the breadcrumb as active to improve navigation clarity.
  • When you move between pages, the keep_query() function makes sure that query parameters like filters and pagination stay the same.
  • The XML also adds a My Time Off menu item to the portal dashboard, allowing users to access their time-off overview with a single click.
  • A placeholder is included to dynamically display the total number of time-off records.

STEP 2 – Add a Portal Counter in Python and Build the Portal Controller with Filter Support

We inherit the portal controller and change the _prepare_home_portal_values() method to show the number of records next to the custom portal menu item. This lets us figure out the number of time-off records and add them to the portal home values, which lets them show up right in the dashboard menu.

Next we make the main portal controller which shows records of time off and controls the filter function.

The image below shows the necessary functions used to compute and display the necessary details in the portal view. These lines of code are to included in the PY file.

Odoo19 website portal with custom filters for easy record management
  • The method exposes the /my_timeoff route and displays the user’s records based on the applied filter criteria.
  • Available filters and their domains are defined in searchbar_filters.
  • Once a filter is selected the domain will updated accordingly before fetching the records.
  • Portal_pager handles the pagination so that you can work with larger sets of results more quickly. The template then gets the prepared data to show.

STEP 3 – Define the Portal View with Filters

Next, we’ll make the portal template that will show the time-off records and the ways to filter them.

The below image shows the lines of code that need to inherited to add the “My Time Off” tile to the portal view. You need to add these lines of code to the XML file.

Odoo19 portal with advanced filters
  • The template displays a responsive table that lists the user’s time-off entries in a clean and structured format.
  • Using Odoo’s built-in portal_table and portal_searchbar components keeps the design in line with the rest of the portal interface.
  • Each record has important information, such as the type of leave, the start and end dates, and the current status.
  • Users can use the filters right from the search bar in the upper right corner of the portal.

Advanced Time-Off Filters in the Odoo Portal

When all the components are implemented the My Time Off button on the portal page has a filter dropdown in the top right corner. Users can quickly find the records they need by filtering their time-off requests by status, such as Approved, To Approve, Second Approval, or Refused. This addition makes the portal easier to use and makes it much easier to find your way around the Odoo19 website portal.

The image below shows the newly added My TIme off button in the portal view.

Odoo19 portal with advanced filters

The user will be taken to the page with the relevant data and the custom filter option will added when they click on the My Time Off button as shown in the picture below.

Odoo19 portal interface optimized with advanced filtering options

Adding the custom filters to portal pages in Odoo19 gives users to much better control over how they access and manage their data. Following the steps above will help you create a portal experience that is more flexible and easy to use and that fits with how your business works. This improvement makes it easier to find your way around the customer portal and makes it much more useful overall. for more details, feel free to contact us.

"Automate Your Business with our Customized Odoo ERP Solutions"

"Get a Cost Estimate for Your ERP Project, Absolutely FREE!"

Get a Free Quote

Leave a Reply

Your email address will not be published. Required fields are marked *