From d40c36a4b1154d531d066724c43b697ddc6cf43b Mon Sep 17 00:00:00 2001 From: pandiyan Date: Tue, 23 Jun 2026 16:54:23 +0530 Subject: [PATCH] fix(manufacturing): make item_code mandatory in Job Card Item The item_code field in the Job Card Item child table was optional, allowing job cards to be saved without a raw material item linked. Set reqd=1 in the JSON and update the Python type annotation accordingly. (cherry picked from commit d7e9a97f8ad67596e34fb947a42cd8ef08e638d1) --- .../manufacturing/doctype/job_card_item/job_card_item.json | 5 +++-- erpnext/manufacturing/doctype/job_card_item/job_card_item.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card_item/job_card_item.json b/erpnext/manufacturing/doctype/job_card_item/job_card_item.json index c8dd6403321..7a00aff34e2 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.json +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.json @@ -27,7 +27,8 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Item Code", - "options": "Item" + "options": "Item", + "reqd": 1 }, { "fieldname": "source_warehouse", @@ -115,7 +116,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2026-05-12 12:22:18.506904", + "modified": "2026-06-23 16:52:37.669110", "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card Item", diff --git a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py index b997e2e935f..27185534807 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py @@ -17,7 +17,7 @@ class JobCardItem(Document): allow_alternative_item: DF.Check consumed_qty: DF.Float description: DF.Text | None - item_code: DF.Link | None + item_code: DF.Link item_group: DF.Link | None item_name: DF.Data | None parent: DF.Data