fix: print hide unnecessary fields

(cherry picked from commit 8f83616b60)

# Conflicts:
#	erpnext/selling/doctype/sales_order_item/sales_order_item.json
This commit is contained in:
khushi8112
2026-04-06 14:35:01 +05:30
committed by Mergify
parent 7c34cb1134
commit cd98312083
5 changed files with 88 additions and 33 deletions

View File

@@ -190,6 +190,7 @@
"fieldtype": "Float", "fieldtype": "Float",
"label": "Received Qty", "label": "Received Qty",
"no_copy": 1, "no_copy": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -206,7 +207,8 @@
{ {
"fieldname": "rejected_qty", "fieldname": "rejected_qty",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Rejected Qty" "label": "Rejected Qty",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.uom != doc.stock_uom", "depends_on": "eval:doc.uom != doc.stock_uom",
@@ -226,6 +228,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "UOM", "label": "UOM",
"options": "UOM", "options": "UOM",
"print_hide": 1,
"reqd": 1 "reqd": 1
}, },
{ {
@@ -261,14 +264,16 @@
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
"label": "Discount on Price List Rate (%)" "label": "Discount on Price List Rate (%)",
"print_hide": 1
}, },
{ {
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Discount Amount", "label": "Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "col_break3", "fieldname": "col_break3",
@@ -401,12 +406,14 @@
{ {
"fieldname": "weight_per_unit", "fieldname": "weight_per_unit",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Weight Per Unit" "label": "Weight Per Unit",
"print_hide": 1
}, },
{ {
"fieldname": "total_weight", "fieldname": "total_weight",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Total Weight", "label": "Total Weight",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -417,7 +424,8 @@
"fieldname": "weight_uom", "fieldname": "weight_uom",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Weight UOM", "label": "Weight UOM",
"options": "UOM" "options": "UOM",
"print_hide": 1
}, },
{ {
"depends_on": "eval:parent.update_stock", "depends_on": "eval:parent.update_stock",
@@ -429,7 +437,8 @@
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Accepted Warehouse", "label": "Accepted Warehouse",
"options": "Warehouse" "options": "Warehouse",
"print_hide": 1
}, },
{ {
"fieldname": "rejected_warehouse", "fieldname": "rejected_warehouse",
@@ -674,7 +683,8 @@
"fieldname": "asset_location", "fieldname": "asset_location",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Asset Location", "label": "Asset Location",
"options": "Location" "options": "Location",
"print_hide": 1
}, },
{ {
"fieldname": "po_detail", "fieldname": "po_detail",
@@ -796,6 +806,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Asset Category", "label": "Asset Category",
"options": "Asset Category", "options": "Asset Category",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -828,6 +839,7 @@
"label": "Rate of Stock UOM", "label": "Rate of Stock UOM",
"no_copy": 1, "no_copy": 1,
"options": "currency", "options": "currency",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -866,6 +878,7 @@
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Rate With Margin", "label": "Rate With Margin",
"options": "currency", "options": "currency",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -892,7 +905,8 @@
"default": "1", "default": "1",
"fieldname": "apply_tds", "fieldname": "apply_tds",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Consider for Tax Withholding" "label": "Consider for Tax Withholding",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1", "depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1",
@@ -918,7 +932,8 @@
"fieldname": "wip_composite_asset", "fieldname": "wip_composite_asset",
"fieldtype": "Link", "fieldtype": "Link",
"label": "WIP Composite Asset", "label": "WIP Composite Asset",
"options": "Asset" "options": "Asset",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.use_serial_batch_fields === 0 && doc.docstatus === 0", "depends_on": "eval:doc.use_serial_batch_fields === 0 && doc.docstatus === 0",
@@ -930,7 +945,8 @@
"default": "0", "default": "0",
"fieldname": "use_serial_batch_fields", "fieldname": "use_serial_batch_fields",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Use Serial No / Batch Fields" "label": "Use Serial No / Batch Fields",
"print_hide": 1
}, },
{ {
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1", "depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
@@ -977,7 +993,8 @@
"fieldname": "distributed_discount_amount", "fieldname": "distributed_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Distributed Discount Amount", "label": "Distributed Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "tax_withholding_category", "fieldname": "tax_withholding_category",
@@ -991,7 +1008,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-15 21:07:49.455930", "modified": "2026-03-25 18:03:33.522195",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice Item", "name": "Purchase Invoice Item",

View File

@@ -207,6 +207,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Stock UOM", "label": "Stock UOM",
"options": "UOM", "options": "UOM",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -310,7 +311,8 @@
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Discount Amount", "label": "Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount", "depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount",
@@ -853,6 +855,7 @@
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Rate of Stock UOM", "label": "Rate of Stock UOM",
"no_copy": 1, "no_copy": 1,
"print_hide": 1,
"options": "currency", "options": "currency",
"read_only": 1 "read_only": 1
}, },
@@ -869,6 +872,7 @@
"fieldname": "grant_commission", "fieldname": "grant_commission",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Grant Commission", "label": "Grant Commission",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -926,7 +930,8 @@
"default": "0", "default": "0",
"fieldname": "use_serial_batch_fields", "fieldname": "use_serial_batch_fields",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Use Serial No / Batch Fields" "label": "Use Serial No / Batch Fields",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.use_serial_batch_fields === 1 && parent.update_stock === 1", "depends_on": "eval:doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
@@ -941,7 +946,8 @@
"fieldname": "distributed_discount_amount", "fieldname": "distributed_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Distributed Discount Amount", "label": "Distributed Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "available_quantity_section", "fieldname": "available_quantity_section",
@@ -1010,7 +1016,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-23 14:37:14.853941", "modified": "2026-02-24 14:37:16.853941",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",

View File

@@ -280,14 +280,16 @@
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
"label": "Discount on Price List Rate (%)" "label": "Discount on Price List Rate (%)",
"print_hide": 1
}, },
{ {
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Discount Amount", "label": "Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "col_break3", "fieldname": "col_break3",
@@ -428,6 +430,7 @@
"fieldname": "weight_per_unit", "fieldname": "weight_per_unit",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Weight Per Unit", "label": "Weight Per Unit",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -763,6 +766,7 @@
"label": "Rate of Stock UOM", "label": "Rate of Stock UOM",
"no_copy": 1, "no_copy": 1,
"options": "currency", "options": "currency",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -779,6 +783,7 @@
"fieldtype": "Float", "fieldtype": "Float",
"label": "Available Qty at Company", "label": "Available Qty at Company",
"no_copy": 1, "no_copy": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -878,7 +883,8 @@
"fieldname": "fg_item_qty", "fieldname": "fg_item_qty",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Finished Good Qty", "label": "Finished Good Qty",
"mandatory_depends_on": "eval:parent.is_subcontracted && !parent.is_old_subcontracting_flow" "mandatory_depends_on": "eval:parent.is_subcontracted && !parent.is_old_subcontracting_flow",
"print_hide": 1
}, },
{ {
"depends_on": "eval:parent.is_internal_supplier", "depends_on": "eval:parent.is_internal_supplier",
@@ -923,7 +929,8 @@
"fieldname": "distributed_discount_amount", "fieldname": "distributed_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Distributed Discount Amount", "label": "Distributed Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@@ -934,6 +941,7 @@
"label": "Subcontracted Quantity", "label": "Subcontracted Quantity",
"no_copy": 1, "no_copy": 1,
"non_negative": 1, "non_negative": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
} }
], ],
@@ -942,7 +950,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2025-10-30 16:51:56.761673", "modified": "2025-11-30 16:51:57.761673",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order Item", "name": "Purchase Order Item",

View File

@@ -343,7 +343,8 @@
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Discount Amount", "label": "Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount", "depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount",
@@ -503,12 +504,14 @@
{ {
"fieldname": "weight_per_unit", "fieldname": "weight_per_unit",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Weight Per Unit" "label": "Weight Per Unit",
"print_hide": 1
}, },
{ {
"fieldname": "total_weight", "fieldname": "total_weight",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Total Weight", "label": "Total Weight",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -822,6 +825,7 @@
"label": "Rate of Stock UOM", "label": "Rate of Stock UOM",
"no_copy": 1, "no_copy": 1,
"options": "currency", "options": "currency",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -830,6 +834,7 @@
"fieldname": "grant_commission", "fieldname": "grant_commission",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Grant Commission", "label": "Grant Commission",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -837,6 +842,7 @@
"fieldtype": "Float", "fieldtype": "Float",
"label": "Picked Qty (in Stock UOM)", "label": "Picked Qty (in Stock UOM)",
"no_copy": 1, "no_copy": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -910,6 +916,7 @@
"fieldtype": "Float", "fieldtype": "Float",
"label": "Production Plan Qty", "label": "Production Plan Qty",
"no_copy": 1, "no_copy": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -926,7 +933,8 @@
"fieldname": "distributed_discount_amount", "fieldname": "distributed_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Distributed Discount Amount", "label": "Distributed Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@@ -995,6 +1003,7 @@
"label": "Subcontracted Quantity", "label": "Subcontracted Quantity",
"no_copy": 1, "no_copy": 1,
"non_negative": 1, "non_negative": 1,
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -1010,7 +1019,8 @@
"fieldname": "fg_item_qty", "fieldname": "fg_item_qty",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Finished Good Qty", "label": "Finished Good Qty",
"mandatory_depends_on": "eval:parent.is_subcontracted" "mandatory_depends_on": "eval:parent.is_subcontracted",
"print_hide": 1
}, },
{ {
"fieldname": "requested_qty", "fieldname": "requested_qty",
@@ -1025,7 +1035,11 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
<<<<<<< HEAD
"modified": "2026-02-21 16:39:00.200328", "modified": "2026-02-21 16:39:00.200328",
=======
"modified": "2026-02-22 16:40:00.200328",
>>>>>>> 8f83616b60 (fix: print hide unnecessary fields)
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order Item", "name": "Sales Order Item",

View File

@@ -334,7 +334,8 @@
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Discount Amount", "label": "Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "col_break3", "fieldname": "col_break3",
@@ -470,12 +471,14 @@
{ {
"fieldname": "weight_per_unit", "fieldname": "weight_per_unit",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Weight Per Unit" "label": "Weight Per Unit",
"print_hide": 1
}, },
{ {
"fieldname": "total_weight", "fieldname": "total_weight",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Total Weight", "label": "Total Weight",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -783,7 +786,8 @@
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Expense Account", "label": "Expense Account",
"options": "Account" "options": "Account",
"print_hide": 1
}, },
{ {
"fieldname": "accounting_dimensions_section", "fieldname": "accounting_dimensions_section",
@@ -820,7 +824,8 @@
"fieldname": "asset_location", "fieldname": "asset_location",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Asset Location", "label": "Asset Location",
"options": "Location" "options": "Location",
"print_hide": 1
}, },
{ {
"depends_on": "is_fixed_asset", "depends_on": "is_fixed_asset",
@@ -829,6 +834,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Asset Category", "label": "Asset Category",
"options": "Asset Category", "options": "Asset Category",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -898,6 +904,7 @@
"label": "Rate of Stock UOM", "label": "Rate of Stock UOM",
"no_copy": 1, "no_copy": 1,
"options": "currency", "options": "currency",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@@ -949,7 +956,8 @@
"fieldname": "base_rate_with_margin", "fieldname": "base_rate_with_margin",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Rate With Margin (Company Currency)", "label": "Rate With Margin (Company Currency)",
"options": "Company:company:default_currency" "options": "Company:company:default_currency",
"print_hide": 1
}, },
{ {
"fieldname": "purchase_invoice", "fieldname": "purchase_invoice",
@@ -1103,7 +1111,8 @@
"default": "0", "default": "0",
"fieldname": "use_serial_batch_fields", "fieldname": "use_serial_batch_fields",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Use Serial No / Batch Fields" "label": "Use Serial No / Batch Fields",
"print_hide": 1
}, },
{ {
"default": "0", "default": "0",
@@ -1126,7 +1135,8 @@
"fieldname": "distributed_discount_amount", "fieldname": "distributed_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Distributed Discount Amount", "label": "Distributed Discount Amount",
"options": "currency" "options": "currency",
"print_hide": 1
}, },
{ {
"fieldname": "amount_difference_with_purchase_invoice", "fieldname": "amount_difference_with_purchase_invoice",
@@ -1140,7 +1150,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-04 14:42:10.646809", "modified": "2026-02-07 14:42:11.646809",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt Item", "name": "Purchase Receipt Item",