From 1b1bc3d81cfb38eec7cd138725ce89fcbfbf55b0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:25:06 +0000 Subject: [PATCH] fix: dont show serial/batch button when PR is submitted (backport #54642) (#54645) * fix: dont show serial/batch button when PR is submitted (#54642) (cherry picked from commit 060defcc2bfd87bef7b6d3740fcc9096de8e1cbc) # Conflicts: # erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json * chore: resolve conflicts --------- Co-authored-by: Mihir Kandoi --- .../purchase_receipt_item/purchase_receipt_item.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 8fda1c44702..1a581652d19 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -1042,7 +1042,7 @@ "search_index": 1 }, { - "depends_on": "eval:doc.use_serial_batch_fields === 0", + "depends_on": "eval:doc.use_serial_batch_fields === 0 && parent.docstatus == 0", "fieldname": "add_serial_batch_for_rejected_qty", "fieldtype": "Button", "label": "Add Serial / Batch No (Rejected Qty)" @@ -1057,7 +1057,7 @@ "fieldtype": "Column Break" }, { - "depends_on": "eval:doc.use_serial_batch_fields === 0", + "depends_on": "eval:doc.use_serial_batch_fields === 0 && parent.docstatus == 0", "fieldname": "add_serial_batch_bundle", "fieldtype": "Button", "label": "Add Serial / Batch No" @@ -1148,7 +1148,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2026-04-07 15:41:47.032889", + "modified": "2026-04-29 16:01:34.154697", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item",