diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 4b095e52377..738ce0b94ee 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -532,6 +532,13 @@ frappe.ui.form.on("BOM", { }); frappe.ui.form.on("BOM Operation", { + finished_good(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + if (row.finished_good === frm.doc.item) { + frappe.model.set_value(row.doctype, row.name, "is_final_finished_good", 1); + } + }, + bom_no(frm, cdt, cdn) { let row = locals[cdt][cdn]; diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 7115d309ffc..f946e80280d 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -764,6 +764,9 @@ class BOM(WebsiteGenerator): if not frappe.db.exists("BOM", {"item": finished_good, "name": bom_no, "docstatus": 1}): frappe.throw(_("BOM {0} not found for the item {1}").format(bom_no, finished_good)) + if self.items and not self.items[0].item_code: + self.set("items", []) + if not qty: qty = 1 diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json index bd6c6464b0d..86ef78ce4d7 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json @@ -51,19 +51,19 @@ { "fieldname": "purchase_receipts", "fieldtype": "Table", - "label": "Receipts", + "label": "Vouchers", "options": "Landed Cost Purchase Receipt", "reqd": 1 }, { "fieldname": "purchase_receipt_items", "fieldtype": "Section Break", - "label": "Purchase Receipt Items" + "label": "Items" }, { "fieldname": "get_items_from_purchase_receipts", "fieldtype": "Button", - "label": "Get Items From Receipts" + "label": "Get Items" }, { "fieldname": "items", @@ -162,7 +162,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2025-07-30 19:25:04.899698", + "modified": "2025-08-27 00:41:53.537375", "modified_by": "Administrator", "module": "Stock", "name": "Landed Cost Voucher", diff --git a/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py b/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py index 0087e54b89d..f728aae7868 100644 --- a/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py +++ b/erpnext/stock/report/serial_no_and_batch_traceability/serial_no_and_batch_traceability.py @@ -108,6 +108,12 @@ class ReportData: sabb.reference_name, "work_order", ) + elif sabb.reference_doctype == "Delivery Note": + row["customer"] = frappe.db.get_value( + "Delivery Note", + sabb.reference_name, + "customer", + ) data.append(row) @@ -500,22 +506,29 @@ class ReportData: "options": "Work Order", "width": 160, }, + ] + ) + + if self.filters.get("traceability_direction") == "Backward": + columns.append( { "fieldname": "supplier", "label": _("Supplier"), "fieldtype": "Link", "options": "Supplier", "width": 150, - }, + } + ) + else: + columns.append( { "fieldname": "customer", "label": _("Customer"), "fieldtype": "Link", "options": "Customer", "width": 150, - }, - ] - ) + } + ) if has_serial_no: columns.extend(