Technical Specifications & Compatibility
Technical Module Name
Supported Odoo Versions
v19.0
License
LGPL-3.
Deployment Support
Odoo OnlineOdoo.shOn Premise
Lines of Code
882 lines (Python / XML / JS)
Overview & Description
Aura Odoo Tech Supports:CommunityEnterprise Nested Tree Version 20.0.1.0.0: a self-referencing one2many as an editable tree Edit a bill of materials right on the form. Turn a one2many that points at itself into a tree you can open, search and rearrange. Drag a row onto another to nest it. Each branch shows its total, either summed up or multiplied down. ✓Open, fold and search branches ✓Drag a row onto another to nest it ✓Totals per branch: sum up or multiply down Built on Any parent and child lines Sum or multiply totals Depends on Web only 2 kinds of total: sum up or multiply down 7 options to fit your model 1 dependency: Odoo Web 0 files loaded from a CDN why you will like it A tree that lives on the record A bill of materials, a work breakdown or a category tree belongs on the record that owns it. This is a field, so you edit it in place. Open and fold branches Click a caret, or use Expand all and Collapse all. The expand_depth option sets how many levels are open when the form loads. Search keeps the way in Type a name and the tree shows the matches with all of their parents opened, so nothing is hidden inside a folded branch. Drag to nest Drop a row on another row and it becomes its child. The totals of every branch are worked out again at once. Drop on the line to make a root Drop a row on the line under the tree and it goes back to the top level. Add a child anywhere The plus button on a row adds a child under it, ready to be named. The Root button adds a top-level row. Double-click a name to rename it. Delete a whole branch The cross on a row removes it and everything under it, even rows that are folded, so no orphans are left behind. Two kinds of total Sum mode adds a branch to everything beneath it and shows its own value in brackets. Explode mode multiplies down the tree, the way a bill of materials reads. Loops cannot be made Dropping a row onto one of its own descendants is refused, and the message says why. Bad data is reported A loop already in the data, or a row whose parent is not in the list, is shown at the top level with a warning instead of hanging the form or vanishing. one attribute Add it to a field Put the widget on the one2many and tell it which field is the parent. nested_tree one2manymany2many The lines must have a many2one that points at their own model. The list inside the field says which fields to load. <field name="line_ids" widget="nested_tree" nolabel="1" options="{'parent_field': 'parent_id', 'label_field': 'name', 'measure_field': 'cost', 'columns': 'quantity', 'mode': 'sum', 'expand_depth': 2, 'height': 460}"> <list> <field name="name"/> <field name="parent_id"/> <field name="quantity"/> <field name="cost"/> </list> </field> Options: parent_field (the many2one to the same model, default parent_id), label_field (the text of each row, default name), measure_field (the number to total), mode (sum or explode, default sum), columns (extra fields to show, comma separated), expand_depth (levels open at first, default 1), height (maximum height in pixels, default 420). see it in action Real screens, real demo data Every picture below is a capture of the widget running in Odoo 19, with a few extra sample rows added to the demo record. The tree on the form Fifteen rows on two levels of roots. Desk, complete shows 492.1: its own 40 plus everything beneath it. Open everything Expand all opens every branch. The counter shows 15 rows in 4 levels. Leaves show only their own value. Search keeps the parents Typing Bolt keeps the match and every row above it, opened, so you can see where it sits. Drag a row onto another The row being dragged is dimmed and the row under the pointer is marked. Drop it and it becomes a child. The totals follow Cable tray now sits under Frame. Frame and Desk are totalled again, and the saved parent is the row you dropped on. Drop on the line to make a root The line under the tree lights up while you drag. Drop a row there and it goes back to the top level. Loops are refused Dropping Frame onto Leg, which is inside it, is refused with a reason. Nothing changes. Add a child and name it The plus button adds a child and opens its name box. Press Enter to keep the name. Double-click any name later to change it. Row buttons on hover Point at a row to see its plus and cross. The cross removes the row with everything under it. Multiply down for a bill of materials With mode set to explode the number is multiplied down the tree: one desk, one frame, four legs and four bolts each make 16 bolts. Bad data is reported Rows with a parent outside the list, and rows that already form a loop, are shown at the top level with a warning under the tree. Read-only, still explorable In a read-only field the editing buttons and dragging are gone. You can still open, fold and search. how it works Three steps to an editable tree 1 Add the widget Put widget="nested_tree" on a one2many whose lines point at their own parent. 2 Name the fields Set parent_field and label_field, and add a measure_field and mode if you want totals. 3 Arrange with the mouse Drag rows to nest them, add and rename rows, then save the form. setup Configure in two minutes Use it on your own model ✓Make sure the line model has a many2one to itself for the parent ✓Add a number field if you want totals, and any other fields to show as columns ✓Edit the form view and set widget="nested_tree" on the one2many, with a list inside for the fields ✓Fill in options, for example parent_field, measure_field and mode ✓Upgrade your module and open a record Try the demo first ✓Turn on developer mode ✓Open Settings → Technical → Nested Tree Demo ✓Open the Desk assembly record ✓Drag a row onto another, then save the form good to know Questions Which Odoo versions and editions? Odoo 19.0, Community and Enterprise. It depends only on the Web module. How is it different from the hierarchy view? A view shows a whole model. This is a field, so it shows and edits the lines of the record you are on, for example one bill of materials. What is the difference between sum and explode? Sum adds a branch to everything beneath it and shows the row own value in brackets. Explode multiplies the number down the tree: two assemblies of three sub-assemblies of four screws make 24 screws. Can I add a child to a row I have not saved yet? No. A parent link can only point at a saved row, so the widget asks you to save the form first. What does deleting a row do? It removes the row and everything under it, including folded rows. The lines are deleted when you save the form. What happens if the data already has a loop? The rows are shown at the top level and a warning under the tree says how many form a loop. The form does not hang. Does it load anything from the internet? No. There is no CDN and no external script. License LGPL-3. Developed by Aura Odoo Tech, https://www.auraodoo.tech. support We are here to help Written and maintained by Aura Odoo Tech. Email Questions, problems or a setting you need — write to us directly. odooaura@gmail.com Website More Odoo modules, documentation and customisation services. www.auraodoo.tech
Key Capabilities & Features
- 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.
Screenshots & Previews
14 images availableExpand Preview
Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview

Expand Preview
The AuraOdoo Quality Guarantee
100% Tested
Verified with Odoo 17, 18, and 19 test pipelines for stability and no conflicts.
Clean Architecture
Built according to official Odoo guidelines and PEP 8 standards with zero bloat.
Dedicated Support
Free installation assistance and quick bug turnaround from our team.