From d9ca7e755fa14d5446188e98408322c0190fdcc4 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 10 Apr 2025 13:03:11 +0530 Subject: [PATCH 1/2] fix: add Address and Contact in Add Column --- .../address_and_contacts/address_and_contacts.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index 11db4176702..a7931efcba5 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -5,8 +5,9 @@ import frappe field_map = { - "Contact": ["first_name", "last_name", "phone", "mobile_no", "email_id", "is_primary_contact"], + "Contact": ["name", "first_name", "last_name", "phone", "mobile_no", "email_id", "is_primary_contact"], "Address": [ + "name", "address_line1", "address_line2", "city", @@ -29,6 +30,12 @@ def get_columns(filters): columns = [ f"{party_type}:Link/{party_type}", f"{frappe.unscrub(str(party_type_value))}::150", + { + "label": "Address", + "fieldtype": "Link", + "options": "Address", + "hidden": 1, + }, "Address Line 1", "Address Line 2", "Postal Code", @@ -36,6 +43,7 @@ def get_columns(filters): "State", "Country", "Is Primary Address:Check", + {"label": "Contact", "fieldtype": "Link", "options": "Contact", "hidden": 1}, "First Name", "Last Name", "Phone", From 39174f9dc0f7399c56a60254b84044d5b0feacf8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Apr 2025 17:32:46 +0530 Subject: [PATCH 2/2] chore: translatable labels --- .../report/address_and_contacts/address_and_contacts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index a7931efcba5..74784f3aff9 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -3,6 +3,7 @@ import frappe +from frappe import _ field_map = { "Contact": ["name", "first_name", "last_name", "phone", "mobile_no", "email_id", "is_primary_contact"], @@ -31,7 +32,7 @@ def get_columns(filters): f"{party_type}:Link/{party_type}", f"{frappe.unscrub(str(party_type_value))}::150", { - "label": "Address", + "label": _("Address"), "fieldtype": "Link", "options": "Address", "hidden": 1, @@ -43,7 +44,7 @@ def get_columns(filters): "State", "Country", "Is Primary Address:Check", - {"label": "Contact", "fieldtype": "Link", "options": "Contact", "hidden": 1}, + {"label": _("Contact"), "fieldtype": "Link", "options": "Contact", "hidden": 1}, "First Name", "Last Name", "Phone",