'Return the list of weekdays that contain at least one working interval.
If no id is given (no calendar), return default weekdays.'

@api.multi
def get_weekdays(self, default_weekdays=None):

    if (not self):
        return (default_weekdays if (default_weekdays is not None) else [0, 1, 2, 3, 4])
    self.ensure_one()
    weekdays = set(map(int, self.attendance_ids.mapped('dayofweek')))
    return list(weekdays)
