diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index feaa4132b8..1027dd5fea 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -67,7 +67,6 @@ frappe.ui.form.on('Material Request', { } if (frm.doc.material_request_type === "Material Issue") { - add_create_pick_list_button(); frm.add_custom_button(__("Issue Material"), () => frm.events.make_stock_entry(frm), __('Create')); } diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json index dbfd7d1bf2..c7aa4586bb 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.json +++ b/erpnext/stock/doctype/pick_list/pick_list.json @@ -98,7 +98,7 @@ "fieldname": "purpose", "fieldtype": "Select", "label": "Purpose", - "options": "Material Transfer for Manufacture\nMaterial Issue\nMaterial Transfer\nDelivery against Sales Order" + "options": "Material Transfer for Manufacture\nMaterial Transfer\nDelivery against Sales Order" }, { "depends_on": "eval:['Material Transfer', 'Material Issue'].includes(doc.purpose)", @@ -115,7 +115,7 @@ } ], "is_submittable": 1, - "modified": "2019-08-26 06:52:04.532885", + "modified": "2019-08-26 16:11:03.184637", "modified_by": "Administrator", "module": "Stock", "name": "Pick List", diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 16bb9e6dc7..d5bf64309d 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -359,9 +359,14 @@ def update_stock_entry_based_on_work_order(pick_list, stock_entry): def update_stock_entry_based_on_material_request(pick_list, stock_entry): for location in pick_list.locations: + target_warehouse = None + if location.material_request_item: + target_warehouse = frappe.get_value('Material Request Item', + location.material_request_item, 'warehouse') item = frappe._dict() item.item_code = location.item_code item.s_warehouse = location.warehouse + item.t_warehouse = target_warehouse item.qty = location.qty item.transfer_qty = location.stock_qty item.uom = location.uom