How to Create Hierarchical View in Odoo 18

October 14, 2025 by
admin


                                                                                                                 



How to Create Hierarchical View in Odoo 18
Introduction
The Hierarchical view in Odoo 18 is a specialized display format that presents data in a tree-like structure, showing parent-child relationships between records. This view type is particularly useful for displaying organizational structures, category hierarchies, departmental breakdowns, or any data that has a natural hierarchical relationship.

Blog walks you through building a simple Hierarchical view in Odoo 18:
1. Understanding the Hierarchical View
The hierarchical view displays data in a parent–child relationship, with each node representing a record. The view can be draggable for reorganization and is more visual compared to the traditional tree (list) view.
2. Defining the Model
We start by defining our product.category model. This model includes a parent_id field for the parent category and a child_ids field for its subcategories.



3. Creating the Views



Highlights:
  • <hierarchy> is the special tag for hierarchy view.
  • child_field="child_ids" tells Odoo where to find children records.
  • draggable="1" enables drag-and-drop rearranging.
  • <templates> define the UI for each node.
4. Adding the Action and Menu

We create an action to open our views and a menu to access it from the UI.

5. Security


Add Category Name and Parent Category.


This screenshot shows Odoo’s Product Category Hierarchy view, where categories like Electronics have subcategories such as Mobile and Speaker. The tree structure expands to display deeper levels, for example Speaker contains brands like JBL, Impex, and Boat.




Conclusion
The hierarchical view in Odoo 18.0 is a powerful yet simple way to represent parent–child relationships in a clear, interactive format.
By combining a well-structured model, a custom hierarchy template, and Odoo’s built-in drag-and-drop functionality, you can transform complex datasets into an easy-to-navigate tree structure.
If you are looking for an ERP implementation partner with diverse industry experience feel free to contact us. Zesty Beanz Technologies is headquartered in Trivandrum Kerala,  We have proven track record of successful implementations across the world in various sectors including Odoo for Manufacturing, Odoo for Trading, Odoo for FMCG, Odoo for Oil & Gas, Odoo for Diary, Odoo for Pharma, Odoo for Cosmetic Clinic, Odoo for Contracting Companies, Odoo for HVAC, Odoo for Logistics, Odoo for Automobile, Odoo for Laundry, Odoo for Field Service, Odoo for E-Commerce & many more
ZestyBeanz offers Developer / Consultant outsourcing programs, Chat with us in Whatsapp and Hire Odoo Developers, Mobile Application Developers, Consultants.
#OdooKerala #OdooKochi #OdooTrivandrum #OdooERP #ProjectManagement #OdooVansales #HireOdooDeveloper