Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. web
  3. X2Many Search View / X2Many group by / X2Many filter/ X2Many tree Search v 18.0
  4. Sales Conditions FAQ

X2Many Search View / X2Many group by / X2Many filter/ X2Many tree Search

by Py-Squad
Odoo

$ 50.00

v 18.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 796
Technical Name x2many_search_view
LicenseLGPL-3
Versions 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 796
Technical Name x2many_search_view
LicenseLGPL-3
Versions 17.0 18.0 19.0
Supports:
Community
Enterprise
Availability:
Odoo Online
Odoo.sh
On Premise

X2Many Search View

This module adds full search view functionality (filters, group by) to x2many fields displayed as tree views inside form views.

Overview

This module extends the functionality of x2many (one2many/many2many) fields in form views by adding a complete SearchBar component above the tree view. This allows users to filter, group, and search records within x2many fields just like they would in regular list views.

Features

SearchBar Component

  • Full SearchBar component integration above x2many tree views
  • Automatically loads the search view for the related model
  • Only appears for list view mode (not kanban views)

Filtering

  • Predefined Filters: All filters defined in the search view are available
  • Custom Filters: Create custom filters directly from the x2many field
  • Client-side Filtering: Filters are applied instantly without page reload
  • Domain Support: Full domain expression support for complex filtering

Group By

  • Single Group By: Group records by any field
  • Multiple Group By: Support for nested grouping (e.g., group by Year → Month → Day)
  • Date Intervals: Full support for date grouping with intervals (day, week, month, quarter, year)
  • Null Value Handling: Records with null values are grouped under "Undefined"
  • Group Counts: Accurate record counts for parent and child groups
  • Server-side Grouping: Uses Odoo's read_group for efficient grouping

Search Field

  • Quick search functionality
  • Search across multiple fields as defined in the search view
  • Real-time filtering as you type

Favorites

  • Save frequently used filter combinations
  • Access saved favorites from the x2many field

Screenshots

SearchBar in X2Many Field

SearchBar in X2Many Field

This screenshot demonstrates how the SearchBar component appears above the x2many tree view, providing access to all search functionality directly within the form view.

Filtering Functionality

Filtering Functionality

This screenshot shows how filters can be applied to x2many records, allowing users to quickly narrow down the displayed records without leaving the form view.

Search By Typing

Manual Filtering Functionality

This screenshot shows the filter when the user starts to input text in the searchbar

Group By Functionality

Group By Functionality

This screenshot demonstrates the group by functionality, showing how records can be organized into groups with expandable/collapsible sections.

Multiple Group By (Nested Groups)

Multiple Group By (Nested Groups)

This screenshot illustrates the advanced grouping capability, showing how multiple group by levels create a hierarchical structure with accurate record counts at each level.

Date Grouping with Intervals

Date Grouping with Intervals

This screenshot demonstrates date grouping functionality, showing how date fields can be grouped using different time intervals (day, week, month, quarter, year).

Custom Filter Creation

Custom Filter Creation

This screenshot shows how users can create custom filters directly from the x2many field, providing flexibility to filter by any field in the related model.

Usage

Basic Setup

The module works automatically once installed. No additional configuration is required.

  1. Define a search view for your x2many field's related model (if not already defined)
  2. Open any form view that contains an x2many field with a tree view
  3. The search view will automatically appear above the x2many tree view
  4. Use filters and group by just like in regular list views

Example: Sale Order Lines

If you have a form view with an x2many field:

<field name="order_line_ids">
    <tree>
        <field name="product_id"/>
        <field name="quantity"/>
        <field name="price_unit"/>
    </tree>
</field>

And you have a search view for sale.order.line:

<record id="sale_order_line_view_search" model="ir.ui.view">
    <field name="name">sale.order.line.search</field>
    <field name="model">sale.order.line</field>
    <field name="arch" type="xml">
        <search>
            <field name="product_id"/>
            <filter string="Uninvoiced" name="uninvoiced" domain="[('invoice_status', '=', 'to invoice')]"/>
            <group expand="0" string="Group By">
                <filter string="Product" name="group_by_product" context="{'group_by': 'product_id'}"/>
                <filter string="Date" name="group_by_date" context="{'group_by': 'date_order:day'}"/>
            </group>
        </search>
    </field>
</record>

The search view will automatically appear above the order lines in the sale order form view, allowing you to:

  • Filter order lines (e.g., show only uninvoiced lines)
  • Group by product, date, etc.
  • Search for specific products

Compatibility

  • Compatible with Odoo 18.0+ and 19.0+
  • Works with both one2many and many2many fields
  • Only activates for list view mode (not kanban views)
  • Fully compatible with existing search views

Known Limitations

  • Only works with list view mode (kanban views are not supported)
  • Requires a search view to be defined for the related model (falls back to empty search view if not found)
  • Grouping requires server-side reload, which may be slower for large datasets

Troubleshooting

SearchBar Not Appearing

  • Ensure the x2many field is displayed in list view mode (not kanban)
  • Check that the related model has a search view defined (or the module will create an empty one)
  • Verify the module is properly installed and assets are loaded

Filters Not Working

  • Check that the filter domain is correct in the search view definition
  • Verify field names in filters match the actual field names in the model
  • Check browser console for any JavaScript errors

Group By Not Working

  • Ensure the field you're grouping by exists in the related model
  • For date fields, verify the date interval format (e.g., date:day, date:month)
  • Check that field definitions are properly loaded (check browser console)

Date Grouping Showing "Undefined"

  • This should be fixed in the latest version
  • If still occurring, check that the date field is not null for all records
  • Verify the date field format in the model

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with