From 1b4da9dc961e1aba8091342ba9230fac6f33daed 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 93a0b8960e5..f21e94ebbe0 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.json +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.json @@ -26,7 +26,8 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Item Code", - "options": "Item" + "options": "Item", + "reqd": 1 }, { "fieldname": "source_warehouse", @@ -107,7 +108,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 ecf082392a3..f1b0f53e9c4 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py @@ -16,7 +16,7 @@ class JobCardItem(Document): allow_alternative_item: DF.Check 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