[hotfix] fixed object has no attribute 'delivered_by_supplier' (#8699)

This commit is contained in:
Makarand Bauskar 2017-05-05 11:52:17 +05:30 committed by Nabin Hait
parent d2a966eef3
commit c4ec937835

View File

@ -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))