'Merge Contact button. Merge the selected partners, and redirect to
the end screen (since there is no other wizard line to process.'

@api.multi
def action_merge(self):

    if (not self.partner_ids):
        self.write({'state': 'finished'})
        return {'type': 'ir.actions.act_window', 'res_model': self._name, 'res_id': self.id, 'view_mode': 'form', 'target': 'new'}
    self._merge(self.partner_ids.ids, self.dst_partner_id)
    if self.current_line_id:
        self.current_line_id.unlink()
    return self._action_next_screen()
