def validate(self):
        """
        Validates this object as best we can and raises Exceptions if we find anything invalid .
        """
        if any(transaction_helper.product_id in ('', None) for transaction_helper in self.transactions):
            raise MissingProductId(_('Product IDs must be set for all ledger updates!'))
dataset/ETHPy150Open dimagi/commcare-hq/corehq/form_processor/parsers/ledgers/helpers.py/StockReportHelper.validate/original