Odoo's Mergebot 60f6fa8fef [MERGE] web_hierarchy,hr_org_chart: add hierarchy view for employees and departments
Purpose
=======

The goal is to be able to have a hierarchy view to see the organisation of a company, that is, to have organisation chart for `hr.employee` model.
To do that, a new view will be introduced in `web_hierarchy` module, called `Hierarchy` view and it will first be used in `hr_org_chart` module for `hr.employee`, `hr.employee.public` and `hr.department` models.

Implementation details
----------------------

- A new python method will be introduced in the models when `web_hierarchy` module is 
  installed. That method, called `hierarchy_read`, is created to fetch the data for the
  hierarchy view when the view will be loaded.
- The definition of hierarchy view is inspired to the definition of the kanban, 
  that is, a template called `hierarchy-box` has to be defined in the arch to draw the card
  displayed in the node of the hierarchy view.
    - Some attributes can be defined on the `hierarchy` tag:
        - `parent_field` (default='parent_id') contains the parent field name 
          to use to fetch the parent record and to be able to fetch the hierarchy.
        - `child_field` (optional attribute) contains the child field name
          to use to find the child records (it is in fact the one2many field).
          If that field is defined then some queries can be avoided since we
          directly fetch the children when a read/search_read is done.
        - `icon` (default='fa-share-alt o_hierarchy_icon') icon displayed inside the 
          `Unfold` button (to show the child nodes) in hierarchy node.
        - `draggable` (default=False) True to allow the user to drag and drop a 
          node (= record) into a row or another node to update its parent node.

task-3376776

closes odoo/odoo#131162

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-16 07:58:37 +00:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%