From f4722d3b24fd6d0916b56e63b9882548fa650d74 Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Mon, 4 Aug 2025 13:20:30 +0000 Subject: [PATCH] feat: add non-negative constraint to batch size and sub operation time fields --- erpnext/manufacturing/doctype/operation/operation.json | 8 +++++--- .../doctype/sub_operation/sub_operation.json | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/operation/operation.json b/erpnext/manufacturing/doctype/operation/operation.json index c712a9f140d..0c569bbb47a 100644 --- a/erpnext/manufacturing/doctype/operation/operation.json +++ b/erpnext/manufacturing/doctype/operation/operation.json @@ -71,7 +71,8 @@ "fieldname": "batch_size", "fieldtype": "Int", "label": "Batch Size", - "mandatory_depends_on": "create_job_card_based_on_batch_size" + "mandatory_depends_on": "create_job_card_based_on_batch_size", + "non_negative": 1 }, { "default": "0", @@ -105,7 +106,7 @@ "icon": "fa fa-wrench", "index_web_pages_for_search": 1, "links": [], - "modified": "2024-05-26 17:59:44.338741", + "modified": "2025-08-04 16:14:57.659318", "modified_by": "Administrator", "module": "Manufacturing", "name": "Operation", @@ -135,9 +136,10 @@ } ], "quick_entry": 1, + "row_format": "Dynamic", "show_preview_popup": 1, "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/sub_operation/sub_operation.json b/erpnext/manufacturing/doctype/sub_operation/sub_operation.json index 8cd8048f22f..d550d755f98 100644 --- a/erpnext/manufacturing/doctype/sub_operation/sub_operation.json +++ b/erpnext/manufacturing/doctype/sub_operation/sub_operation.json @@ -24,7 +24,8 @@ "fieldname": "time_in_mins", "fieldtype": "Float", "in_list_view": 1, - "label": "Operation Time" + "label": "Operation Time", + "non_negative": 1 }, { "fieldname": "column_break_5", @@ -39,15 +40,16 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-03-27 13:10:45.777866", + "modified": "2025-08-04 16:15:11.425349", "modified_by": "Administrator", "module": "Manufacturing", "name": "Sub Operation", "owner": "Administrator", "permissions": [], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +}