Merge pull request #52678 from mihir-kandoi/sales-purchase-invoice-update-stock-cleanup

chore: do not show stock details if update stock is disabled
This commit is contained in:
rohitwaghchaure
2026-02-16 22:31:25 +05:30
committed by GitHub
2 changed files with 15 additions and 16 deletions

View File

@@ -52,6 +52,7 @@
"stock_uom_rate", "stock_uom_rate",
"is_free_item", "is_free_item",
"apply_tds", "apply_tds",
"allow_zero_valuation_rate",
"section_break_22", "section_break_22",
"net_rate", "net_rate",
"net_amount", "net_amount",
@@ -97,7 +98,6 @@
"service_start_date", "service_start_date",
"service_end_date", "service_end_date",
"reference", "reference",
"allow_zero_valuation_rate",
"item_tax_rate", "item_tax_rate",
"bom", "bom",
"include_exploded_items", "include_exploded_items",
@@ -420,6 +420,7 @@
"options": "UOM" "options": "UOM"
}, },
{ {
"depends_on": "eval:parent.update_stock",
"fieldname": "warehouse_section", "fieldname": "warehouse_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Warehouse" "label": "Warehouse"
@@ -447,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",
@@ -459,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",
@@ -577,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",
@@ -800,7 +799,7 @@
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "eval:parent.is_internal_supplier && parent.update_stock", "depends_on": "eval:parent.is_internal_supplier",
"fieldname": "from_warehouse", "fieldname": "from_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
@@ -896,7 +895,7 @@
"label": "Consider for Tax Withholding" "label": "Consider for Tax Withholding"
}, },
{ {
"depends_on": "eval:parent.update_stock == 1 && (doc.use_serial_batch_fields === 0 || doc.docstatus === 1)", "depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1",
"fieldname": "serial_and_batch_bundle", "fieldname": "serial_and_batch_bundle",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Serial and Batch Bundle", "label": "Serial and Batch Bundle",
@@ -906,7 +905,7 @@
"search_index": 1 "search_index": 1
}, },
{ {
"depends_on": "eval:parent.update_stock == 1 && (doc.use_serial_batch_fields === 0 || doc.docstatus === 1)", "depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1",
"fieldname": "rejected_serial_and_batch_bundle", "fieldname": "rejected_serial_and_batch_bundle",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Rejected Serial and Batch Bundle", "label": "Rejected Serial and Batch Bundle",
@@ -922,7 +921,7 @@
"options": "Asset" "options": "Asset"
}, },
{ {
"depends_on": "eval:parent.update_stock === 1 && (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"
@@ -992,7 +991,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2025-12-13 14:10:02.379392", "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

@@ -52,6 +52,7 @@
"is_free_item", "is_free_item",
"apply_tds", "apply_tds",
"grant_commission", "grant_commission",
"allow_zero_valuation_rate",
"section_break_21", "section_break_21",
"net_rate", "net_rate",
"net_amount", "net_amount",
@@ -88,7 +89,6 @@
"serial_and_batch_bundle", "serial_and_batch_bundle",
"use_serial_batch_fields", "use_serial_batch_fields",
"col_break5", "col_break5",
"allow_zero_valuation_rate",
"incoming_rate", "incoming_rate",
"item_tax_rate", "item_tax_rate",
"actual_batch_qty", "actual_batch_qty",
@@ -580,6 +580,7 @@
{ {
"collapsible": 1, "collapsible": 1,
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no", "collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
"depends_on": "eval:parent.update_stock",
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Stock Details" "label": "Stock Details"
@@ -595,7 +596,7 @@
"print_hide": 1 "print_hide": 1
}, },
{ {
"depends_on": "eval: parent.is_internal_customer && parent.update_stock", "depends_on": "eval: parent.is_internal_customer",
"fieldname": "target_warehouse", "fieldname": "target_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -613,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",
@@ -626,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",
@@ -633,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",
@@ -906,7 +906,7 @@
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "eval:parent.update_stock == 1 && (doc.use_serial_batch_fields === 0 || doc.docstatus === 1)", "depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1",
"fieldname": "serial_and_batch_bundle", "fieldname": "serial_and_batch_bundle",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Serial and Batch Bundle", "label": "Serial and Batch Bundle",
@@ -916,7 +916,7 @@
"search_index": 1 "search_index": 1
}, },
{ {
"depends_on": "eval:parent.update_stock === 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-02 16:46:12.597972", "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",