def METHOD_NAME(self):
    for record in self:
        if record.tbai_enabled and not record.tbai_certificate_id:
            raise exceptions.ValidationError(
                _("Company %s TicketBAI Certificate is required.") % record.name
            )