From 3893ba302c8086c3fc63e1214de4b3d7aed88193 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 26 Nov 2018 14:03:23 +0530 Subject: [PATCH] If is pos and no pos profile use the item's default warehouse for packing materials --- erpnext/stock/doctype/packed_item/packed_item.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 0c55b433a1..e0ad7ac9df 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -49,8 +49,9 @@ def update_packing_list_item(doc, packing_item_code, qty, main_item_row, descrip pi.qty = flt(qty) pi.description = description if not pi.warehouse: - pi.warehouse = (main_item_row.warehouse - if (doc.get('is_pos') or not item.default_warehouse) else item.default_warehouse) + pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos') + or not item.default_warehouse) and main_item_row.warehouse) else item.default_warehouse) + if not pi.batch_no: pi.batch_no = cstr(main_item_row.get("batch_no")) if not pi.target_warehouse: