From cbe5ad6337eeeb5965cd530792fefd15e699d366 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:06:05 +0530 Subject: [PATCH] fix: make operation mandatory when any sub operation row is added (backport #54245) (#54247) Co-authored-by: Sudarshan <73628063+sudarsan2001@users.noreply.github.com> fix: make operation mandatory when any sub operation row is added (#54245) --- .../manufacturing/doctype/sub_operation/sub_operation.json | 5 +++-- erpnext/manufacturing/doctype/sub_operation/sub_operation.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/sub_operation/sub_operation.json b/erpnext/manufacturing/doctype/sub_operation/sub_operation.json index c7530e41aca..36160fec699 100644 --- a/erpnext/manufacturing/doctype/sub_operation/sub_operation.json +++ b/erpnext/manufacturing/doctype/sub_operation/sub_operation.json @@ -16,7 +16,8 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Operation", - "options": "Operation" + "options": "Operation", + "reqd": 1 }, { "default": "0", @@ -40,7 +41,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-08-04 16:15:11.425349", + "modified": "2026-04-13 12:17:33.776504", "modified_by": "Administrator", "module": "Manufacturing", "name": "Sub Operation", diff --git a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py index f4bb62e8f6c..a34a96fc1a5 100644 --- a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py +++ b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py @@ -16,7 +16,7 @@ class SubOperation(Document): from frappe.types import DF description: DF.SmallText | None - operation: DF.Link | None + operation: DF.Link parent: DF.Data parentfield: DF.Data parenttype: DF.Data