diff options
| author | jbm-odoo <jbm@odoo.com> | 2019-09-04 12:29:52 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-09-12 07:39:05 +0000 |
| commit | 7d623a75a2caf3d767fe0844cbf457cd8d2a2d24 (patch) | |
| tree | ba4c6bd306fc322c2be6090021acee81647ceb65 /addons | |
| parent | 424adb63e3ecd9ce6888c3246633a6414215f34d (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_holidays/models/hr_leave_type.py | 1 | ||||
| -rw-r--r-- | addons/hr_holidays/static/src/xml/time_off_calendar.xml | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/hr_holidays/models/hr_leave_type.py b/addons/hr_holidays/models/hr_leave_type.py index 3695fb36ce0..49e81bda0a4 100644 --- a/addons/hr_holidays/models/hr_leave_type.py +++ b/addons/hr_holidays/models/hr_leave_type.py @@ -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] diff --git a/addons/hr_holidays/static/src/xml/time_off_calendar.xml b/addons/hr_holidays/static/src/xml/time_off_calendar.xml index 70bba2fd937..72a50649062 100644 --- a/addons/hr_holidays/static/src/xml/time_off_calendar.xml +++ b/addons/hr_holidays/static/src/xml/time_off_calendar.xml @@ -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> |
