(self)
Validates this object as best we can and raises Exceptions if we find anything invalid .
Validates this object as best we can and raises Exceptions if we find anything invalid .
Validates this object as best we can and raises Exceptions if we find anything invalid .
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!'))
def validate ( self ) : 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!' ) )