[FIX] hr_holidays: Fix the wrong timezone display
closes odoo/odoo#98064 X-original-commit: ec462b8361e03516905eb38c041ad511b1604896 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
committed by
Kevin Baptiste
parent
300d3d1b74
commit
de51970c7d
@@ -842,13 +842,15 @@ class HolidaysRequest(models.Model):
|
||||
)
|
||||
))
|
||||
else:
|
||||
user_tz = timezone(leave.tz)
|
||||
date_from_utc = leave.date_from and leave.date_from.astimezone(user_tz).date()
|
||||
res.append((
|
||||
leave.id,
|
||||
_("%(person)s on %(leave_type)s: %(duration).2f hours on %(date)s",
|
||||
person=target,
|
||||
leave_type=leave.holiday_status_id.name,
|
||||
duration=leave.number_of_hours_display,
|
||||
date=fields.Date.to_string(leave.date_from),
|
||||
date=fields.Date.to_string(date_from_utc),
|
||||
)
|
||||
))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user