chore: do not show serial batch selector if not needed

This commit is contained in:
Mihir Kandoi
2026-02-15 21:06:26 +05:30
parent 4499e974a0
commit cdc62e7327
2 changed files with 6 additions and 8 deletions

View File

@@ -448,7 +448,6 @@
"print_hide": 1 "print_hide": 1
}, },
{ {
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Batch No", "label": "Batch No",
@@ -460,14 +459,12 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"label": "Serial No", "label": "Serial No",
"no_copy": 1 "no_copy": 1
}, },
{ {
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "rejected_serial_no", "fieldname": "rejected_serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"label": "Rejected Serial No", "label": "Rejected Serial No",
@@ -578,6 +575,7 @@
}, },
{ {
"default": "0", "default": "0",
"depends_on": "eval:parent.update_stock",
"fieldname": "allow_zero_valuation_rate", "fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Allow Zero Valuation Rate", "label": "Allow Zero Valuation Rate",
@@ -923,7 +921,7 @@
"options": "Asset" "options": "Asset"
}, },
{ {
"depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1", "depends_on": "eval:doc.use_serial_batch_fields === 0 && doc.docstatus === 0",
"fieldname": "add_serial_batch_bundle", "fieldname": "add_serial_batch_bundle",
"fieldtype": "Button", "fieldtype": "Button",
"label": "Add Serial / Batch No" "label": "Add Serial / Batch No"
@@ -993,7 +991,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-15 20:52:20.097603", "modified": "2026-02-15 21:07:49.455930",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice Item", "name": "Purchase Invoice Item",

View File

@@ -614,7 +614,6 @@
"options": "Quality Inspection" "options": "Quality Inspection"
}, },
{ {
"depends_on": "eval: doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Batch No", "label": "Batch No",
@@ -627,6 +626,7 @@
}, },
{ {
"default": "0", "default": "0",
"depends_on": "eval:parent.update_stock",
"fieldname": "allow_zero_valuation_rate", "fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Allow Zero Valuation Rate", "label": "Allow Zero Valuation Rate",
@@ -634,7 +634,6 @@
"print_hide": 1 "print_hide": 1
}, },
{ {
"depends_on": "eval: doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"label": "Serial No", "label": "Serial No",
@@ -917,6 +916,7 @@
"search_index": 1 "search_index": 1
}, },
{ {
"depends_on": "eval:doc.use_serial_batch_fields === 0 && doc.docstatus === 0",
"fieldname": "pick_serial_and_batch", "fieldname": "pick_serial_and_batch",
"fieldtype": "Button", "fieldtype": "Button",
"label": "Pick Serial / Batch No" "label": "Pick Serial / Batch No"
@@ -1009,7 +1009,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-15 20:50:18.580088", "modified": "2026-02-15 21:08:57.341638",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",