'If there are no date set for date_to, automatically set one 8 hours later than
the date_from. Also update the number_of_days.'

@api.onchange('date_from')
def _onchange_date_from(self):

    date_from = self.date_from
    date_to = self.date_to
    if (date_from and (not date_to)):
        date_to_with_delta = (fields.Datetime.from_string(date_from) + timedelta(hours=HOURS_PER_DAY))
        self.date_to = str(date_to_with_delta)
    if ((date_to and date_from) and (date_from <= date_to)):
        self.number_of_days_temp = self._get_number_of_days(date_from, date_to, self.employee_id.id)
    else:
        self.number_of_days_temp = 0
