Merge pull request #16088 from rohitwaghchaure/fixed_pos_profile_packing_items

If is pos is enabled and no pos profile then use the item's default warehouse for packing materials
This commit is contained in:
Nabin Hait 2018-11-27 13:10:14 +05:30 committed by GitHub
commit 3c31e4ad4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,8 +49,9 @@ def update_packing_list_item(doc, packing_item_code, qty, main_item_row, descrip
pi.qty = flt(qty) pi.qty = flt(qty)
pi.description = description pi.description = description
if not pi.warehouse: if not pi.warehouse:
pi.warehouse = (main_item_row.warehouse pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos')
if (doc.get('is_pos') or not item.default_warehouse) else item.default_warehouse) or not item.default_warehouse) and main_item_row.warehouse) else item.default_warehouse)
if not pi.batch_no: if not pi.batch_no:
pi.batch_no = cstr(main_item_row.get("batch_no")) pi.batch_no = cstr(main_item_row.get("batch_no"))
if not pi.target_warehouse: if not pi.target_warehouse: