[FIX] hr_holidays: untranslated 'Hours' in hr_leave

This translates 'Hours' when displaying the number of unpaid hours.

closes odoo/odoo#63876

X-original-commit: 09d1e18eb401990a14d850e07a55cff498b30ac5
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
This commit is contained in:
nie
2020-12-29 11:24:22 +00:00
parent 37bc6b52a7
commit d118d8ff50
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -1589,6 +1589,7 @@ msgstr ""
#. module: hr_holidays
#. openerp-web
#: code:addons/hr_holidays/models/hr_leave.py:0
#: code:addons/hr_holidays/static/src/xml/time_off_calendar.xml:0
#: code:addons/hr_holidays/static/src/xml/time_off_calendar.xml:0
#: model:ir.model.fields.selection,name:hr_holidays.selection__hr_leave_allocation__unit_per_interval__hours
+2 -1
View File
@@ -522,9 +522,10 @@ class HolidaysRequest(models.Model):
def _compute_number_of_hours_text(self):
# YTI Note: All this because a readonly field takes all the width on edit mode...
for leave in self:
leave.number_of_hours_text = '%s%g Hours%s' % (
leave.number_of_hours_text = '%s%g %s%s' % (
'' if leave.request_unit_half or leave.request_unit_hours else '(',
float_round(leave.number_of_hours_display, precision_digits=2),
_('Hours'),
'' if leave.request_unit_half or leave.request_unit_hours else ')')
@api.depends('state', 'employee_id', 'department_id')