[FIX] hr_holidays: Time unit in time off summary

If time off type is in hours, I want to have hours as unit in the summary
(upper my personnal calendar).

closes odoo/odoo#36421

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
jbm-odoo
2019-09-12 07:39:05 +00:00
committed by Yannick Tivisse
parent 424adb63e3
commit 7d623a75a2
2 changed files with 3 additions and 2 deletions
@@ -234,6 +234,7 @@ class HolidaysType(models.Model):
'virtual_remaining_leaves': lt.virtual_remaining_leaves,
'max_leaves': lt.max_leaves,
'leaves_taken': lt.leaves_taken,
'request_unit': lt.request_unit,
}, lt.allocation_type)
for lt in leave_types]
@@ -13,10 +13,10 @@
<div class="mt-2">
<t t-if="need_allocation">
<span t-esc="timeoff[1]['leaves_taken']" class="o_timeoff_big o_timeoff_purple"/> / <span t-esc="timeoff[1]['max_leaves']"/> Days
<span t-esc="timeoff[1]['leaves_taken']" class="o_timeoff_big o_timeoff_purple"/> / <span t-esc="timeoff[1]['max_leaves']"/> <t t-if="timeoff[1]['request_unit'] == 'hour'">Hours</t><t t-else="">Days</t>
</t>
<t t-else="">
<span t-esc="timeoff[1]['leaves_taken']" class="o_timeoff_big o_timeoff_purple"/> Days
<span t-esc="timeoff[1]['leaves_taken']" class="o_timeoff_big o_timeoff_purple"/> <t t-if="timeoff[1]['request_unit'] == 'hour'">Hours</t><t t-else="">Days</t>
</t>
</div>