From 964f9275dcbd0728dc3669ec846af9be6a8ed4c8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:19:46 +0000 Subject: [PATCH] feat: add non-negative constraint to batch size and sub operation time fields (backport #48948) (#48991) * feat: add non-negative constraint to batch size and sub operation time fields (cherry picked from commit f4722d3b24fd6d0916b56e63b9882548fa650d74) # Conflicts: # erpnext/manufacturing/doctype/operation/operation.json # erpnext/manufacturing/doctype/sub_operation/sub_operation.json * chore: resolve conflicts * chore: resolve conflicts * chore: resolve conflicts --------- Co-authored-by: KerollesFathy Co-authored-by: Mihir Kandoi --- erpnext/manufacturing/doctype/operation/operation.json | 7 ++++--- .../manufacturing/doctype/sub_operation/sub_operation.json | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/operation/operation.json b/erpnext/manufacturing/doctype/operation/operation.json index 753552ce54e..65daa03a76b 100644 --- a/erpnext/manufacturing/doctype/operation/operation.json +++ b/erpnext/manufacturing/doctype/operation/operation.json @@ -70,7 +70,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", @@ -104,7 +105,7 @@ "icon": "fa fa-wrench", "index_web_pages_for_search": 1, "links": [], - "modified": "2021-11-24 19:15:24.357187", + "modified": "2025-08-04 16:14:57.659318", "modified_by": "Administrator", "module": "Manufacturing", "name": "Operation", @@ -137,4 +138,4 @@ "sort_field": "modified", "sort_order": "DESC", "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 10cee32398a..c7530e41aca 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,7 +40,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-07-15 16:39:41.635362", + "modified": "2025-08-04 16:15:11.425349", "modified_by": "Administrator", "module": "Manufacturing", "name": "Sub Operation", @@ -49,4 +50,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} \ No newline at end of file +}