[FIX] hr_holidays: Correctly compute number_of_days on form loading
Backport of https://github.com/odoo/odoo/commit/1c391c3dfbdf733304fc882b9045d25e20e6dd1f Closes #29800 closes odoo/odoo#29853
This commit is contained in:
committed by
RomainLibert
parent
6d02b7c2e9
commit
0a3f8740f9
@@ -303,6 +303,7 @@ class HolidaysRequest(models.Model):
|
||||
tz = self.env.user.tz if self.env.user.tz and not self.request_unit_custom else 'UTC' # custom -> already in UTC
|
||||
self.date_from = timezone(tz).localize(datetime.combine(self.request_date_from, hour_from)).astimezone(UTC).replace(tzinfo=None)
|
||||
self.date_to = timezone(tz).localize(datetime.combine(self.request_date_to, hour_to)).astimezone(UTC).replace(tzinfo=None)
|
||||
self._onchange_leave_dates()
|
||||
|
||||
@api.onchange('request_unit_half')
|
||||
def _onchange_request_unit_half(self):
|
||||
|
||||
Reference in New Issue
Block a user