def METHOD_NAME(self):
    for record in self:
        country_code = record.country_id.code or ""
        if record.cpf and country_code.upper() == "BR":
            cpf = misc.punctuation_rm(record.cpf)
            if not cnpj_cpf.validar(cpf):
                raise ValidationError(_("Invalid CPF!"))
        return True