From 046834a97aaab40fc6e606328bf18cc4df99f71f Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Wed, 8 Mar 2023 20:40:03 +0530 Subject: [PATCH] fix: `required_qty` get reset to `1` for Alternative Item in WO --- erpnext/manufacturing/doctype/work_order/work_order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 4aff42cb73..97480b2945 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -506,7 +506,7 @@ frappe.ui.form.on("Work Order Item", { callback: function(r) { if (r.message) { frappe.model.set_value(cdt, cdn, { - "required_qty": 1, + "required_qty": row.required_qty || 1, "item_name": r.message.item_name, "description": r.message.description, "source_warehouse": r.message.default_warehouse,