From 9f9184c908212dc87b8ec435154e6a00220685d0 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 8 Aug 2019 17:41:38 +0530 Subject: [PATCH] fix: not able to transfer raw materials for subcontracted items (#18650) --- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 8117d9d514..6ed6766288 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -483,7 +483,7 @@ def make_rm_stock_entry(purchase_order, rm_items): 'from_warehouse': rm_item_data["warehouse"], 'stock_uom': rm_item_data["stock_uom"], 'main_item_code': rm_item_data["item_code"], - 'allow_alternative_item': item_wh[rm_item_code].get('allow_alternative_item') + 'allow_alternative_item': item_wh.get(rm_item_code, {}).get('allow_alternative_item') } } stock_entry.add_to_stock_entry_detail(items_dict)