fix: Remove "Material Issue" purpose from pick list
- Because in material issue we already define source warehouse
This commit is contained in:
parent
8de8a78235
commit
d6be8989e4
@ -67,7 +67,6 @@ frappe.ui.form.on('Material Request', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frm.doc.material_request_type === "Material Issue") {
|
if (frm.doc.material_request_type === "Material Issue") {
|
||||||
add_create_pick_list_button();
|
|
||||||
frm.add_custom_button(__("Issue Material"),
|
frm.add_custom_button(__("Issue Material"),
|
||||||
() => frm.events.make_stock_entry(frm), __('Create'));
|
() => frm.events.make_stock_entry(frm), __('Create'));
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
"fieldname": "purpose",
|
"fieldname": "purpose",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Purpose",
|
"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)",
|
"depends_on": "eval:['Material Transfer', 'Material Issue'].includes(doc.purpose)",
|
||||||
@ -115,7 +115,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2019-08-26 06:52:04.532885",
|
"modified": "2019-08-26 16:11:03.184637",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Pick List",
|
"name": "Pick List",
|
||||||
|
@ -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):
|
def update_stock_entry_based_on_material_request(pick_list, stock_entry):
|
||||||
for location in pick_list.locations:
|
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 = frappe._dict()
|
||||||
item.item_code = location.item_code
|
item.item_code = location.item_code
|
||||||
item.s_warehouse = location.warehouse
|
item.s_warehouse = location.warehouse
|
||||||
|
item.t_warehouse = target_warehouse
|
||||||
item.qty = location.qty
|
item.qty = location.qty
|
||||||
item.transfer_qty = location.stock_qty
|
item.transfer_qty = location.stock_qty
|
||||||
item.uom = location.uom
|
item.uom = location.uom
|
||||||
|
Loading…
x
Reference in New Issue
Block a user