From 61c781325d1ffcb14e23f93374d0880baec7fe4d Mon Sep 17 00:00:00 2001 From: ks093 Date: Thu, 17 Jan 2019 12:16:43 +0530 Subject: [PATCH] Fix to show low stock message. In case of order being placed with stock quantity more than available, message showing stock available wasn't showing due to tuple unpacking not happening correctly. --- erpnext/shopping_cart/cart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 254d7b74af3..cc3205c7d70 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -66,7 +66,7 @@ def place_order(): sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True)) for item in sales_order.get("items"): item.reserved_warehouse, is_stock_item = frappe.db.get_value("Item", - item.item_code, ["website_warehouse", "is_stock_item"]) or None, None + item.item_code, ["website_warehouse", "is_stock_item"]) if is_stock_item: item_stock = get_qty_in_stock(item.item_code, "website_warehouse")