def fragment(self):
        """
        A short string representation of this to be used in sms correspondence
        """
        if self.quantity is not None:
            quant = self.quantity
        else:
            quant = ''
        # FIXME product fetch here is inefficient
        return '%s%s' % (Product.get(self.product_id).code.lower(), quant)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/form_processor/parsers/ledgers/helpers.py/StockTransactionHelper.fragment/original