recursive_tree_view: add icon, images and docs

This commit is contained in:
Marc Durepos 2024-10-30 14:38:39 -04:00
parent 6bab956a54
commit d9879ab235
7 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,42 @@
# Recursive Tree View
Bemade Inc.
Copyright (C) 2023-June Bemade Inc. ([https://www.bemade.org](https://www.bemade.org)).
Author: Marc Durepos (Contact : [marc@bemade.org](mailto\:marc@bemade.org))
This program is under the terms of the GNU Lesser General Public License (LGPL-3).
For details, visit [https://www.gnu.org/licenses/lgpl-3.0.en.html](https://www.gnu.org/licenses/lgpl-3.0.en.html)
## Overview
The Recursive Tree View module for Odoo allows users to easily visualize hierarchical data structures in Odoo list (tree) views. With this module, you can mark a tree view as recursive, enabling the expansion of descendants of a parent record in a seamless and user-friendly way.
## Features
- Expand and collapse descendants directly in tree views.
- Mark specific tree views as recursive to represent hierarchical data structures.
- Enhance the visualization of complex relationships, making it easier to navigate and understand.
## Configuration
1. Install the module in Odoo.
2. Configure the desired tree views to be recursive by modifying the view definition. Simply add the attribute recursive="1" (or true or True) to the tree element.
## Usage
1. Navigate to the model with the hierarchical structure (e.g., organizational units, product categories).
2. Expand a parent record in the tree view to visualize its descendants.
3. Use the expand/collapse functionality to navigate the entire hierarchy.
## Technical Details
- The module extends the `tree` view type to add recursive behavior,
allowing descendants to be dynamically loaded and displayed.
- This feature is particularly useful for models that represent hierarchical relationships, such as categories, organizational units, or nested tasks.
- The module uses the field specified by `_parent_name` on the model, which is `parent_id` by default.
## License
This program is under the terms of the GNU Lesser General Public License (LGPL-3).
For details, visit [https://www.gnu.org/licenses/lgpl-3.0.en.html](https://www.gnu.org/licenses/lgpl-3.0.en.html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CalDAV Synchronization</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #000000; /* Black background */
color: #b48a1d; /* Gold color */
}
.container {
margin-top: 20px;
}
h1, h2 {
color: #b48a1d; /* Gold color */
}
p, ul, ol {
color: #ffffff; /* White color for better readability on black background */
}
</style>
</head>
<body>
<div class="container">
<h1 class="text-center">Recursive Tree View</h1>
<img src="images/recursive-tree.png" class="img-fluid my-4"
alt="Main Screenshot"/>
<p><strong>Author:</strong> Bemade Inc. (Marc Durepos)</p>
<p><strong>Website:</strong> <a href="https://www.bemade.org" class="text-warning">www.bemade.org</a></p>
<p><strong>License:</strong> GNU Lesser General Public License (LGPL-3)</p>
<h2>Overview</h2>
<p>The Recursive Tree View module for Odoo allows users to easily visualize
hierarchical data structures in tree views. Mark a tree view as
recursive to enable expansion of descendants of a parent record,
enhancing the visualization of complex data.
</p>
<h2>Screenshots</h2>
<h3>Collapsed Tree</h3>
<img src="images/collapsed.png" class="img-fluid my-4"
alt="Collapsed Tree View"/>
<h3>Expanded Tree</h3>
<img src="images/expanded.png" class="img-fluid my-4"
alt="Expanded Tree View"/>
<h2>Features</h2>
<ul>
<li>Expand and collapse descendants directly in tree views.</li>
<li>Mark specific tree views as recursive to represent hierarchical
data.
</li>
<li>Improve navigation and understanding of complex relationships.</li>
</ul>
<h2>Configuration</h2>
<ol>
<li>Install the module in Odoo.</li>
<li>Configure the desired tree views to be recursive by modifying the
view definition. Simply add the attribute recursive="1" to
a given tree element to make it recursive.
</li>
</ol>
<h3>Usage</h3>
<ul>
<li>Navigate to the view marked as recursive.</li>
<li>Click the arrow to the left of a parent record to
expand it and see its descendants.</li>
<li>Use expand/collapse to navigate the hierarchy as desired
.</li>
</ul>
<h3>Technical</h3>
<ul>
<li>
The module extends the `tree` view type to add recursive
behavior, allowing descendants to be dynamically loaded and
displayed.
</li>
<li>This feature is particularly useful for models that represent hierarchical relationships, such as categories, organizational units, or nested tasks.</li>
<li>The module uses the field specified by `_parent_name` on the model, which is `parent_id` by default.</li>
</ul>
<h3>License</h3>
<p>This program is under the terms of the GNU Lesser General Public License
(LGPL-3). For details, visit <a
href="https://www.gnu.org/licenses/lgpl-3.0.en.html">
https://www.gnu.org/licenses/lgpl-3.0.en.html</a>.
</p>
</div>
</body>
</html>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="800px" height="800px" viewBox="0 0 97.5 97.5" xml:space="preserve">
<g>
<path d="M95.5,62.844h-6.164V58.84c0-7.135-5.804-12.938-12.938-12.938H52.445V34.656h6.088c1.104,0,2-0.896,2-2V13.09
c0-1.104-0.896-2-2-2H38.967c-1.104,0-2,0.896-2,2v19.566c0,1.104,0.896,2,2,2h6.087v11.245H21.103
c-7.135,0-12.938,5.804-12.938,12.938v4.004H2c-1.104,0-2,0.896-2,2V84.41c0,1.104,0.896,2,2,2h19.566c1.104,0,2-0.896,2-2V64.844
c0-1.104-0.896-2-2-2h-6.009V58.84c0-3.058,2.487-5.545,5.545-5.545h23.951v9.549h-6.087c-1.104,0-2,0.896-2,2V84.41
c0,1.104,0.896,2,2,2h19.566c1.104,0,2-0.896,2-2V64.844c0-1.104-0.896-2-2-2h-6.087v-9.549h23.951
c3.058,0,5.545,2.487,5.545,5.545v4.004h-6.01c-1.104,0-2,0.896-2,2V84.41c0,1.104,0.896,2,2,2H95.5c1.104,0,2-0.896,2-2V64.844
C97.5,63.739,96.604,62.844,95.5,62.844z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB