Bottom to Top Hierarchy Chart Widget
Bottom to Top Hierarchy Chart Widget
Geminate comes with feature that introduce a widget/tool that provide hierarchy chart from bottom to top approach. i.e if we are at child level employee then we can see chart of all parent manager of that selected employee. so no need to manually look in to each records to verify manager of each employee at top-level.
Moreever we can use this in every object or database table which has many2one of itself like,
1. project can have relation (many2one) of itself as project can contains sub projects.
2. task can have relation (many2one) of itself as project can contains sub tasks.
3. employee can have relation (many2one) of itself as an employee can contains their manager. etc.
How to use
Here you need to add :
- options = "{'enable_hierarchy':True, 'image': True, 'field_list':{'name':'name','title':'job_position'}}"
- Note : you can use m2o field in field_list like {'name': 'department.name', 'title': 'job_id.name'}
Options :
- enable_hierarchy : True >> this parameter helps to enable hierarchy chart on m2o field.
- image : True >> if relation object of m2o field having any field named with 'image' then it ll display image of that record in hierarchy chart.
- field_list : {'name':'name', 'title':'job_position'} >> list of key : value pair to be passed for fields to be display as header and it's value. maximum fields allows are two, one is for header and second for it's value.
- Many2one field : field_list in passed m2o field >> {'name':'department.name', 'title':'job_id.name'}
i.e. :
- Title : Director
- Name : Thomas Ritchie
Note :
- this widget only applicable when you have m2o field of same object in formview like:
- Employee : hr.employee, having 'parent_id' m2o related to 'hr.employee' itself