Skip to content

Commit

Permalink
[FIX] hr_holidays: Time unit in time off summary
Browse files Browse the repository at this point in the history
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 514f782
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions addons/hr_holidays/models/hr_leave_type.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def get_days_all_request(self):
'virtual_remaining_leaves': lt.virtual_remaining_leaves, 'virtual_remaining_leaves': lt.virtual_remaining_leaves,
'max_leaves': lt.max_leaves, 'max_leaves': lt.max_leaves,
'leaves_taken': lt.leaves_taken, 'leaves_taken': lt.leaves_taken,
'request_unit': lt.request_unit,
}, lt.allocation_type) }, lt.allocation_type)
for lt in leave_types] for lt in leave_types]


Expand Down
4 changes: 2 additions & 2 deletions addons/hr_holidays/static/src/xml/time_off_calendar.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


<div class="mt-2"> <div class="mt-2">
<t t-if="need_allocation"> <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 t-else=""> <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> </t>
</div> </div>


Expand Down

0 comments on commit 514f782

Please sign in to comment.