'Define the type of the result of the merge.  If at least one of the
element to merge is an opp, the resulting new element will be an opp.
Otherwise it will be a lead.
We\'ll directly use a list of browse records instead of a list of ids
for performances\' sake: it will spare a second browse of the
leads/opps.
:param list opps: list of browse records containing the leads/opps to process
:return string type: the type of the final element'

@api.multi
def _merge_get_result_type(self):

    if any(((record.type == 'opportunity') for record in self)):
        return 'opportunity'
    return 'lead'
