From 757eaf5fcff080cc3ed866742c4a81bb9e987886 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Thu, 6 Aug 2026 14:52:41 +0530 Subject: [PATCH] refactor(ui): hide the primary address and contact section The Address & Contact cards now show these details and mark which record is primary, so the section below only repeats it. Values are still stored and Customer.search_fields keeps working, since search reads the column rather than the form. Depends on frappe/frappe#41600. --- erpnext/buying/doctype/supplier/supplier.json | 6 +++++- erpnext/selling/doctype/customer/customer.json | 13 ++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json index 20cedab2afd..d0453c44fb0 100644 --- a/erpnext/buying/doctype/supplier/supplier.json +++ b/erpnext/buying/doctype/supplier/supplier.json @@ -378,6 +378,7 @@ { "fieldname": "primary_address_and_contact_detail_section", "fieldtype": "Section Break", + "hidden": 1, "label": "Primary Address and Contact" }, { @@ -392,6 +393,7 @@ "fetch_from": "supplier_primary_contact.mobile_no", "fieldname": "mobile_no", "fieldtype": "Read Only", + "hidden": 1, "label": "Mobile No", "no_copy": 1 }, @@ -399,12 +401,14 @@ "fetch_from": "supplier_primary_contact.email_id", "fieldname": "email_id", "fieldtype": "Read Only", + "hidden": 1, "label": "Email ID", "no_copy": 1 }, { "fieldname": "primary_address", "fieldtype": "Text Editor", + "hidden": 1, "label": "Primary Address Preview", "no_copy": 1, "read_only": 1 @@ -588,7 +592,7 @@ "link_fieldname": "party" } ], - "modified": "2026-07-23 10:00:00.000000", + "modified": "2026-08-06 14:58:00.561519", "modified_by": "Administrator", "module": "Buying", "name": "Supplier", diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index 24aeebf7544..d27dd60b9a7 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -282,7 +282,6 @@ "depends_on": "eval:!doc.__islocal", "fieldname": "address_contacts", "fieldtype": "Section Break", - "label": "Address and Contact", "options": "fa fa-map-marker" }, { @@ -314,6 +313,7 @@ "description": "Select, to make the customer searchable with these fields", "fieldname": "primary_address_and_contact_detail", "fieldtype": "Section Break", + "hidden": 1, "label": "Primary Address and Contact" }, { @@ -328,6 +328,7 @@ "fetch_from": "customer_primary_contact.mobile_no", "fieldname": "mobile_no", "fieldtype": "Read Only", + "hidden": 1, "label": "Mobile No", "no_copy": 1, "options": "Mobile" @@ -336,6 +337,7 @@ "fetch_from": "customer_primary_contact.email_id", "fieldname": "email_id", "fieldtype": "Read Only", + "hidden": 1, "label": "Email Id", "no_copy": 1, "options": "Email" @@ -355,6 +357,7 @@ { "fieldname": "primary_address", "fieldtype": "Text Editor", + "hidden": 1, "label": "Primary Address", "no_copy": 1, "read_only": 1 @@ -524,19 +527,19 @@ }, { "default": "0", + "description": "If checked, this Customer is only available for transactions in the companies listed below.", "fieldname": "restrict_to_companies", "fieldtype": "Check", "label": "Restrict to Companies", - "description": "If checked, this Customer is only available for transactions in the companies listed below.", "permlevel": 1 }, { + "depends_on": "eval:doc.restrict_to_companies", "fieldname": "allowed_companies", "fieldtype": "Table MultiSelect", "label": "Allowed Companies", - "options": "Company Restriction", - "depends_on": "eval:doc.restrict_to_companies", "mandatory_depends_on": "eval:doc.restrict_to_companies", + "options": "Company Restriction", "permlevel": 1 }, { @@ -727,7 +730,7 @@ "link_fieldname": "party" } ], - "modified": "2026-07-23 12:00:00.000000", + "modified": "2026-08-06 15:14:35.049972", "modified_by": "Administrator", "module": "Selling", "name": "Customer",