[IMP] hr_org_chart: add child_count in unfold button of hierarchy card

Before this commit, the user can unfold a node in hierarchy view but
before clicking on it he cannot know how many child nodes there are.

This commit adds the number of child nodes in the Unfold button with
the default icon.

task-3376776
This commit is contained in:
Xavier Bol (xbo)
2023-10-16 08:17:31 +02:00
parent 1048111a18
commit 03ce25127d
2 changed files with 8 additions and 0 deletions
@@ -65,5 +65,9 @@
display: grid;
grid-template-columns: 50px 1fr 50px;
border-radius: 0;
.o_hierarchy_icon {
vertical-align: text-top;
}
}
}
@@ -45,6 +45,10 @@
<span style="grid-column: 2;">
Unfold
</span>
<span class="text-end" style="grid-column: 3;">
<t t-out="props.node.childResIds.length"/>
<i class="fa ps-1 fa-share-alt o_hierarchy_icon"/>
</span>
</t>
<t t-else="">
<span style="grid-column: 2;">