From c4ec937835a16e3f345b94dd9e21330f511f0b65 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Fri, 5 May 2017 11:52:17 +0530 Subject: [PATCH] [hotfix] fixed object has no attribute 'delivered_by_supplier' (#8699) --- erpnext/buying/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/utils.py b/erpnext/buying/utils.py index 9146c58d0e..9ad1c5cf85 100644 --- a/erpnext/buying/utils.py +++ b/erpnext/buying/utils.py @@ -64,7 +64,7 @@ def validate_for_items(doc): validate_end_of_life(d.item_code, item.end_of_life, item.disabled) # validate stock item - if item.is_stock_item==1 and d.qty and not d.warehouse and not d.delivered_by_supplier: + if item.is_stock_item==1 and d.qty and not d.warehouse and not d.get("delivered_by_supplier"): frappe.throw(_("Warehouse is mandatory for stock Item {0} in row {1}").format(d.item_code, d.idx)) items.append(cstr(d.item_code))