If is pos and no pos profile use the item's default warehouse for packing materials
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 0c55b43..e0ad7ac 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -49,8 +49,9 @@
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: