fix: mandatory warehouse wrror while updating items after submission

This commit is contained in:
thefalconx33 2020-02-09 12:19:03 +05:30
parent c438a20b76
commit 9225159d8c

View File

@ -1135,6 +1135,7 @@ def set_sales_order_defaults(parent_doctype, parent_doctype_name, child_docname,
child_item.reqd_by_date = p_doctype.delivery_date
child_item.uom = item.stock_uom
child_item.conversion_factor = get_conversion_factor(item_code, item.stock_uom).get("conversion_factor") or 1.0
child_item.warehouse = p_doctype.set_warehouse or p_doctype.items[0].warehouse
return child_item