refactor: renamed varint_item_code to variant_item_code (#27025)
This commit is contained in:
parent
9225f02599
commit
f13315809e
@ -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
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user