All In One Hierarchy View: Account Parent & All Models
by Code Sparks https://code-sparks.odoo.com$ 20.02
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Contacts (contacts)
• Invoicing (account) • Discuss (mail) |
| Lines of code | 1467 |
| Technical Name |
cs_hierarchical_view |
| License | LGPL-3 |
| Website | https://code-sparks.odoo.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Contacts (contacts)
• Invoicing (account) • Discuss (mail) |
| Lines of code | 1467 |
| Technical Name |
cs_hierarchical_view |
| License | LGPL-3 |
| Website | https://code-sparks.odoo.com |
All In One Hierarchy View: Account Parent & All Models
by Code Sparks
Transform standard Odoo List Views into expandable hierarchical structures using parent-child relationships.
Visualize Account Parent hierarchies and apply the same structured view across all Odoo models that support parent-child relationships.
Easily expand and collapse multi-level records directly inside the List View for improved clarity, organization, and navigation.
Universal Hierarchical List View for Odoo
All In One Hierarchy View works seamlessly across all Odoo environments. It enables users to visualize Account Parent hierarchies and apply the same structured view across all Odoo models that support parent-child relationships.
How to use
You can use the hierarchy view in two ways: on any model (global) or specifically for Chart of Accounts. For any model, add parent/child fields, then define the view and action. For Accounts, this module already includes the setup.
For any model (global)
Replace your.model with your model's technical name (e.g. product.category, res.partner).
1. Python file
from odoo import models, fields
class YourModel(models.Model):
_inherit = 'your.model'
parent_id = fields.Many2one('your.model', string='Parent')
child_ids = fields.One2many('your.model', 'parent_id', string='Children')
2. XML view
<record id="view_your_model_hierarchy" model="ir.ui.view">
<field name="name">your.model.hierarchy</field>
<field name="model">your.model</field>
<field name="arch" type="xml">
<cs_hierarchy string="Hierarchy"
default_order="name"
parent_field="parent_id"
child_field="child_ids">
<field name="name"/>
</cs_hierarchy>
</field>
</record>
3. Action (add cs_hierarchy to view mode)
<record id="your_module.action_your_model" model="ir.actions.act_window">
<field name="name">Your Model</field>
<field name="res_model">your.model</field>
<field name="view_mode">cs_hierarchy,list,form</field>
</record>
For Chart of Accounts (Account)
This module already adds hierarchy to account.account. No extra code is required; after installing, open Accounting â Configuration â Chart of Accounts and switch to the Hierarchy view. If you need to customize, here is what the module does:
1. Python file (account.account)
from odoo import models, fields
class AccountAccount(models.Model):
_inherit = 'account.account'
parent_id = fields.Many2one('account.account', string='Parent Account')
child_ids = fields.One2many('account.account', 'parent_id', string='Children Accounts')
2. XML view
<record id="view_account_account_hierarchy" model="ir.ui.view">
<field name="name">account.account.hierarchy</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<cs_hierarchy string="Hierarchical Accounts"
default_order="name"
parent_field="parent_id"
child_field="child_ids">
<field name="name"/>
<field name="code"/>
</cs_hierarchy>
</field>
</record>
3. Action (Chart of Accounts)
<record id="account.action_account_form" model="ir.actions.act_window">
<field name="name">Chart of Accounts</field>
<field name="res_model">account.account</field>
<field name="view_mode">cs_hierarchy,list,form,activity</field>
<field name="search_view_id" ref="account.view_account_search"/>
<field name="view_id" ref="account.view_account_list"/>
</record>
Explore this module
Overview
The All In One Hierarchy View: Account Parent & All Models module enhances Odoo's standard List View by introducing a powerful expandable parent-child hierarchical structure.
- Display Account Parent hierarchy directly inside the List View.
- Support all models that use parent-child (parent_id) relationships.
- Expand and collapse multi-level records dynamically.
- Improve visualization of structured business data.
- Work seamlessly with standard and custom Odoo models.
Features
Display Account Parent hierarchy directly inside the List View.
Universal support for all models with parent-child (parent_id) relationships.
Expand and collapse multi-level hierarchical records dynamically.
Support for unlimited nested hierarchy levels.
Seamless integration with standard and custom Odoo models.
Screenshots
01
Install module/application.
02
Once the module is installed, you can see the Account Parent hierarchy directly inside the List View. Go to Accounting â Configuration â Chart of Accounts and switch to the Hierarchy view.
03
User can also use this module to display the hierarchy of any model that uses the parent_id field.
For example, in contact model, there is a parent_id field that is used to display the hierarchy of the contacts.
Go to Contacts â Contacts and switch to the Hierarchy view.
We will provide FREE 30 days support for any doubt, queries, and bug fixing (excluding data recovery) or any type of issues related to this module. This is applicable from the date of purchase.
Need Help with All In One Hierarchy View?
Have questions, need technical assistance, or want to request enhancements? We're here to help you get the most out of All In One Hierarchy View: Account Parent & All Models for better hierarchical data visualization inside Odoo.
We are committed to helping you implement structured, scalable, and easy-to-navigate hierarchical views across your Odoo system.
Please log in to comment on this module