'Default get for name, opportunity_ids.
If there is an exisitng partner link to the lead, find all existing
opportunities links with this partner to merge all information together'

@api.model
def default_get(self, fields):

    result = super(Lead2OpportunityPartner, self).default_get(fields)
    if self._context.get('active_id'):
        tomerge = {int(self._context['active_id'])}
        partner_id = result.get('partner_id')
        lead = self.env['crm.lead'].browse(self._context['active_id'])
        email = (lead.partner_id.email if lead.partner_id else lead.email_from)
        tomerge.update(self._get_duplicated_leads(partner_id, email, include_lost=True).ids)
        if (('action' in fields) and (not result.get('action'))):
            result['action'] = ('exist' if partner_id else 'create')
        if ('partner_id' in fields):
            result['partner_id'] = partner_id
        if ('name' in fields):
            result['name'] = ('merge' if (len(tomerge) >= 2) else 'convert')
        if (('opportunity_ids' in fields) and (len(tomerge) >= 2)):
            result['opportunity_ids'] = list(tomerge)
        if lead.user_id:
            result['user_id'] = lead.user_id.id
        if lead.team_id:
            result['team_id'] = lead.team_id.id
        if ((not partner_id) and (not lead.contact_name)):
            result['action'] = 'nothing'
    return result
