diff options
| author | lul-odoo <lul@odoo.com> | 2018-10-16 07:49:42 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-12-06 13:56:45 +0000 |
| commit | 48254cc8a153e061b64c399abb90cf4d4440bd65 (patch) | |
| tree | 1bff3f59a7e35ab43e1eca4db962131810a49940 /addons/hr_org_chart/static/src/xml | |
| parent | 24609722f1cd8e647f15c2a81f31ac272bac6317 (diff) | |
[IMP] hr_org_chart: Allow recursion in hierarchy
Employees can appear multiple times in the org chart
Purpose
=======
Allow recursive hierarchy (an employee can be its own manager; e.g. the CEO is manager of everyone
but is also member of a department managed by the CTO who is himself managed by the CEO).
This means an employee might appear in multiple place in the organisational chart.
The button to see more of the hierarchy in the organisation chart opens all employees under the N+2 of the
current employee being displayed but does not open the view of the N+2.
Specification
=============
Add 'subordinates_ids' computed field on 'hr.employee' to get all subordinates (direct and indirect).
closes odoo/odoo#27900
Diffstat (limited to 'addons/hr_org_chart/static/src/xml')
| -rw-r--r-- | addons/hr_org_chart/static/src/xml/hr_org_chart.xml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/addons/hr_org_chart/static/src/xml/hr_org_chart.xml b/addons/hr_org_chart/static/src/xml/hr_org_chart.xml index e4e7f9fa231..fa5db5f32a8 100644 --- a/addons/hr_org_chart/static/src/xml/hr_org_chart.xml +++ b/addons/hr_org_chart/static/src/xml/hr_org_chart.xml @@ -3,7 +3,7 @@ <t t-name="hr_org_chart_employee"> <div t-attf-class="o_org_chart_entry o_org_chart_entry_#{employee_type} media"> - <t t-set="is_self" t-value="employee_type == 'self'"/> + <t t-set="is_self" t-value="employee.id == view_employee_id"/> <div class="o_media_left"> <!-- NOTE: Since by the default on not squared images odoo add white borders, @@ -60,8 +60,7 @@ <t t-if='managers_more'> <div class="o_org_chart_entry o_org_chart_more media"> <div class="o_media_left"> - <a class="text-center o_employee_redirect" - t-att-href="managers[0].link" + <a class="text-center o_employee_more_managers" t-att-data-employee-id="managers[0].id"> <i t-attf-class="fa fa-angle-double-up" role="img" aria-label="More managers" title="More managers"/> </a> @@ -93,14 +92,14 @@ <div t-if="children.length" class="o_org_chart_group_down"> <t t-foreach="children" t-as="employee"> <t t-set="emp_count" t-value="emp_count + 1"/> - <t t-if="emp_count < 8"> + <t t-if="emp_count < 20"> <t t-call="hr_org_chart_employee"> <t t-set="employee_type" t-value="'sub'"/> </t> </t> </t> - <t t-if="(children.length + managers.length) > 7"> + <t t-if="(children.length + managers.length) > 19"> <div class="o_org_chart_entry o_org_chart_more media"> <div class="o_media_left"> <a href="#" |
