Merge pull request #16440 from rohitwaghchaure/not_able_to_submit_work_order

fix: not able to submit work order
This commit is contained in:
Nabin Hait
2019-01-22 09:57:49 +05:30
committed by GitHub

View File

@@ -349,7 +349,8 @@ frappe.ui.form.on("Work Order", {
before_submit: function(frm) {
frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);
frm.fields_dict.required_items.grid.toggle_reqd("source_warehouse", true);
frm.toggle_reqd("transfer_material_against", frm.doc.operations);
frm.toggle_reqd("transfer_material_against",
frm.doc.operations && frm.doc.operations.length > 0);
frm.fields_dict.operations.grid.toggle_reqd("workstation", frm.doc.operations);
},