| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 647 |
| Technical Name |
x2m_search |
| License | OPL-1 |
| Website | https://www.linkedin.com/in/muhamdabdrhman/ |
X2M Search
Search, filter, and group by in O2M and M2M tree views
Add Odoo's native search view to One2Many (O2M) and Many2Many (M2M) tree views embedded in form views. No XML changes required—works with your existing models and search views.
Features
- Native search view — Uses Odoo's standard search bar above embedded tree views.
- Automatic detection — When the related model has a search view in
ir.ui.view, it is shown automatically. - Filters and Group By — Filters and group by options from the search view arch are available and applied to the tree.
- Field-specific search — Search runs on the fields defined in the model's search view.
- No configuration needed — No XML modifications; works with all O2M and M2M tree views.
How it works
When you open a form that contains an O2M or M2M field with a tree view, the module checks whether the related model has a search view. If it does, the search bar is rendered above the tree. You can type in the search box, apply filters, and use group by exactly like in standard list views. Rows are filtered and grouped in real time without leaving the form.
If the model has no search view, a minimal default search (on a text field) is still provided so you can filter the embedded list.
Screenshots
Filter order lines (e.g. Quantity >= 5)
Apply filters from the search view directly on the embedded tree. Only lines matching the filter are shown.
Group by (e.g. Unit of Measure)
Use group-by options from the search view to group rows (e.g. by Units, Dozens) without leaving the form.
Requirements
Odoo 17.0 (or compatible version). Depends only on base and web.
For support, contact muhamed.inbox@gmail.com.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module