'Adapt the value of start_date(time)/stop_date(time) according to start/stop fields and allday. Also, compute
the duration for not allday meeting ; otherwise the duration is set to zero, since the meeting last all the day.'

@api.multi
@api.depends('allday', 'start', 'stop')
def _compute_dates(self):

    for meeting in self:
        if meeting.allday:
            meeting.start_date = meeting.start
            meeting.start_datetime = False
            meeting.stop_date = meeting.stop
            meeting.stop_datetime = False
            meeting.duration = 0.0
        else:
            meeting.start_date = False
            meeting.start_datetime = meeting.start
            meeting.stop_date = False
            meeting.stop_datetime = meeting.stop
            meeting.duration = self._get_duration(meeting.start, meeting.stop)
