'Check some preconditions before the wizard executes.'

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

    for lead in self.env['crm.lead'].browse(self._context.get('active_ids', [])):
        if (lead.probability == 100):
            raise UserError(_('Closed/Dead    leads    cannot    be    converted    into    opportunities.'))
    return False
