Skip to content
Permalink
Browse files

[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 #36421

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
  • Loading branch information...
jbm-odoo committed Sep 4, 2019
1 parent ca9a733 commit 514f782a76cc731b05506774cb39385455b241b6
@@ -233,6 +233,7 @@ def get_days_all_request(self):
'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>

0 comments on commit 514f782

Please sign in to comment.
You can’t perform that action at this time.