feat: added source warehouse field in the work order
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js
index 80bd89d..9c8aa45 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.js
+++ b/erpnext/manufacturing/doctype/work_order/work_order.js
@@ -121,6 +121,15 @@
}
},
+ source_warehouse: function(frm) {
+ if (frm.doc.source_warehouse) {
+ frm.doc.required_items.forEach(d => {
+ frappe.model.set_value(d.doctype, d.name,
+ "source_warehouse", frm.doc.source_warehouse);
+ });
+ }
+ },
+
refresh: function(frm) {
erpnext.toggle_naming_series();
erpnext.work_order.set_custom_buttons(frm);
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.json b/erpnext/manufacturing/doctype/work_order/work_order.json
index 6152fbb..e6990fd 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.json
+++ b/erpnext/manufacturing/doctype/work_order/work_order.json
@@ -29,9 +29,10 @@
"from_wip_warehouse",
"update_consumed_material_cost_in_project",
"warehouses",
+ "source_warehouse",
"wip_warehouse",
- "fg_warehouse",
"column_break_12",
+ "fg_warehouse",
"scrap_warehouse",
"required_items_section",
"required_items",
@@ -226,12 +227,14 @@
"options": "fa fa-building"
},
{
+ "description": "This is a location where operations are executed.",
"fieldname": "wip_warehouse",
"fieldtype": "Link",
"label": "Work-in-Progress Warehouse",
"options": "Warehouse"
},
{
+ "description": "This is a location where final product stored.",
"fieldname": "fg_warehouse",
"fieldtype": "Link",
"label": "Target Warehouse",
@@ -242,6 +245,7 @@
"fieldtype": "Column Break"
},
{
+ "description": "This is a location where scraped materials are stored.",
"fieldname": "scrap_warehouse",
"fieldtype": "Link",
"label": "Scrap Warehouse",
@@ -463,6 +467,13 @@
"fieldname": "update_consumed_material_cost_in_project",
"fieldtype": "Check",
"label": "Update Consumed Material Cost In Project"
+ },
+ {
+ "description": "This is a location where raw materials are available.",
+ "fieldname": "source_warehouse",
+ "fieldtype": "Link",
+ "label": "Source Warehouse",
+ "options": "Warehouse"
}
],
"icon": "fa fa-cogs",
@@ -470,7 +481,7 @@
"image_field": "image",
"is_submittable": 1,
"links": [],
- "modified": "2019-12-04 11:20:04.695123",
+ "modified": "2020-01-31 12:46:23.636033",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Work Order",