diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 3f50b41be1..e72c8eb408 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -235,7 +235,7 @@ frappe.ui.form.on("BOM", { reqd: 1, }, { - fieldname: "varint_item_code", + fieldname: "variant_item_code", options: "Item", label: __("Variant Item"), fieldtype: "Link", @@ -287,7 +287,7 @@ frappe.ui.form.on("BOM", { let variant_items = data.items || []; variant_items.forEach(d => { - if (!d.varint_item_code) { + if (!d.variant_item_code) { frappe.throw(__("Select variant item code for the template item {0}", [d.item_code])); } }) @@ -299,7 +299,7 @@ frappe.ui.form.on("BOM", { has_template_rm.forEach(d => { dialog.fields_dict.items.df.data.push({ "item_code": d.item_code, - "varint_item_code": "", + "variant_item_code": "", "qty": d.qty, "source_warehouse": d.source_warehouse, "operation": d.operation diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 282b5d0afe..69a4b95c9a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -838,7 +838,7 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): for item in variant_items: args = frappe._dict({ - "item_code": item.get("varint_item_code"), + "item_code": item.get("variant_item_code"), "required_qty": item.get("qty"), "qty": item.get("qty"), # for bom "source_warehouse": item.get("source_warehouse"), @@ -859,7 +859,7 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): }, bom_doc) if not args.source_warehouse: - args["source_warehouse"] = get_item_defaults(item.get("varint_item_code"), + args["source_warehouse"] = get_item_defaults(item.get("variant_item_code"), wo_doc.company).default_warehouse args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate"))