| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 57 |
| Technical Name |
no_clear_all_filters |
| License | LGPL-3 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 57 |
| Technical Name |
no_clear_all_filters |
| License | LGPL-3 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
Clear All Filters
One click to wipe every active filter, group-by, favorite, and search query in the search bar
Odoo 18 FREE Zero ConfigFive Filters, Five Tiny X Buttons?
In standard Odoo, every active filter, group-by, and favorite has its own little x. Clearing the search bar to start over means hunting them down one by one.
Without this module
Click X on every chip. Four filters → four clicks. Tedious every single time.
With this module
A single button next to the search bar. One click. Search bar empty. Done.
Four Things It Does Well
Lightweight, focused, no configuration.
Wipes every active filter, group-by, favorite, and typed query in a single click. No partial state.
The button only appears when there is something to clear. A clean view stays clean.
List, kanban, pivot, graph, calendar - anywhere Odoo renders the standard search bar, the button is there.
Pure frontend OWL patch on the SearchBar component. No Python, no RPC, no database changes.
Uses Odoo's native searchModel.deactivateGroup() + clearQuery(). No private API.
Real-World Scenarios
After drilling down by salesperson, stage, and date range, one click brings the full pipeline back instead of hunting four separate close buttons.
Switch between "low-stock by warehouse" and the global product list without manually undoing every group-by and favorite.
Repeatedly toggling period, journal, and partner filters during reconciliation. The Clear All button skips the cleanup ritual.
Going from "my open tickets, this week, high priority" back to the team-wide queue is now a single button instead of three deactivations.
How It Works
Use the search bar normally - filters, group-bys, favorites, and free-text queries. The Clear All button appears the moment something is active.
A single click deactivates every facet through Odoo's native searchModel API and clears any typed query.
One re-render, one fresh query. The button hides itself again until the next time you build a filter stack.
Installation
Two steps. No Python dependencies, no database changes, no configuration.
Step 1 - addons path
Drop the module inPlace the no_clear_all_filters folder in any directory listed in your Odoo addons_path.
Step 2 - in Odoo
Install the moduleApps menu → remove the Apps filter → search "Clear All Filters" → Install. The button appears next to the search bar everywhere immediately.
Works With Every Search Bar
No allow-list. No per-view setup. The OWL patch extends Odoo's standard SearchBar component.
Views without a search bar (forms, dashboards) are simply not affected - no error, no broken layout.
What This Module Doesn't Do
Honest scope. Here's what's out of reach.
Filters declared in the action's context as defaults reapply on the next render. The button clears user-applied facets, not action-level defaults.
It's all or nothing. There is no "clear filters but keep group-bys" mode - use the per-facet x chip when you only want to remove one.
The button is shown to every user who can see the search bar. There is no per-user toggle to hide it.
Once you click Clear All, the previous facet stack is gone. Re-pick what you need from the favorites menu if you want it back.
The button is appended inside the standard o_cp_searchview container. A theme that replaces the search bar entirely will need its own integration point.
Two modules can each patch() the SearchBar prototype safely, but conflicting renders of the same xpath may collide. Test once if your stack already extends the search bar.
🛡 A Note on Odoo's searchModel
The button drives the same public searchModel API that Odoo's own facet-close buttons use - deactivateGroup() per facet, then clearQuery() for the typed text. Notifications are batched with the blockNotification flag so the view re-renders only once at the end. As long as Odoo keeps that public API stable, the module keeps working without per-version forks. Each version branch ships its own JS test suite to catch the day that contract changes.
FAQ
No. The button only deactivates favorites in the current view. Your saved favorites stay in the favorites menu, ready to re-apply.
User-applied facets are cleared. Filters declared in the action's context as defaults reapply on the next render - that's a server-side decision, not a client-side facet.
Yes. The patch is on the shared SearchBar component, so every view that uses Odoo's standard search bar gets the button.
This branch targets Odoo 18 and uses the v18 searchModel API surface. Earlier-version branches will follow if there's demand.
Multiple modules can patch() SearchBar.prototype simultaneously - that's the supported Odoo pattern. Conflicts only arise if another module replaces the same xpath inside o_cp_searchview.
It uses the public searchModel.deactivateGroup() and clearQuery() methods. As long as those stay in their current form, the module keeps working. The shipped JS test suite catches regressions early.
Technical Details
patch() on SearchBar.prototype + xpath into o_cp_searchviewMore Modules by Naim OUDAYET
Production-ready Odoo modules. Tested. Documented.
Preview any PDF report in a full-screen dialog before printing or downloading.
FREEEncrypt PDF reports with static or dynamic passwords. GDPR-friendly.
FREEBrowse the complete catalog of Odoo modules by Naim OUDAYET.
apps.odoo.com
Clear All Filters - Free, open source, Odoo 18
© Naim OUDAYET - LGPL-3 License
Please log in to comment on this module