Merge branch 'develop' of https://github.com/frappe/erpnext into fix-incorrect-translations

This commit is contained in:
Suraj Shetty
2020-01-29 15:06:50 +05:30
125 changed files with 18290 additions and 14829 deletions

View File

@@ -124,3 +124,11 @@ def get_price(item_code, price_list, customer_group, company, qty=1):
price_obj["formatted_price"] = ""
return price_obj
def get_non_stock_item_status(item_code, item_warehouse_field):
#if item belongs to product bundle, check if bundle items are in stock
if frappe.db.exists("Product Bundle", item_code):
items = frappe.get_doc("Product Bundle", item_code).get_all_children()
return all([ get_qty_in_stock(d.item_code, item_warehouse_field).in_stock for d in items ])
else:
return 1