'returns new values when user_id has changed'

@api.model
def _onchange_user_values(self, user_id):

    if (user_id and self._context.get('team_id')):
        team = self.env['crm.team'].browse(self._context['team_id'])
        if (user_id in team.member_ids.ids):
            return {}
    team_id = self.env['crm.team']._get_default_team_id(user_id=user_id)
    return {'team_id': team_id}
