'Returns true if product bundle has stock item'

def product_bundle_has_stock_item(self, product_bundle):

    ret = len(frappe.db.sql(u'select    i.name    from    tabItem    i,    `tabProduct    Bundle    Item`    pbi\n DCTB  DCTB  DCTB where    pbi.parent    =    %s    and    pbi.item_code    =    i.name    and    i.is_stock_item    =    1', product_bundle))
    return ret
