def _alias_get_creation_values(self):
    values = super(Team, self)._alias_get_creation_values()
    values['alias_model_id'] = self.env['ir.model']._get('crm.lead').id
    if self.id:
        if ((not self.use_leads) and (not self.use_opportunities)):
            values['alias_name'] = False
        values['alias_defaults'] = defaults = ast.literal_eval((self.alias_defaults or '{}'))
        has_group_use_lead = self.env.user.has_group('crm.group_use_lead')
        defaults['type'] = ('lead' if (has_group_use_lead and self.use_leads) else 'opportunity')
        defaults['team_id'] = self.id
    return values
def _alias_get_creation_values(self):
    values = super(Team, self)._alias_get_creation_values()
    values['alias_model_id'] = self.env['ir.model']._get('crm.lead').id
    if self.id:
        if ((not self.use_leads) and (not self.use_opportunities)):
            values['alias_name'] = False
        values['alias_defaults'] = defaults = ast.literal_eval((self.alias_defaults or '{}'))
        has_group_use_lead = self.env.user.has_group('crm.group_use_lead')
        defaults['type'] = ('lead' if (has_group_use_lead and self.use_leads) else 'opportunity')
        defaults['team_id'] = self.id
    return values