Merge pull request #49482 from frappe/mergify/bp/version-15-hotfix/pr-46996

fix: Allow adding Address/Contact fields to `Address And Contacts` report (backport #46996)
This commit is contained in:
ruthra kumar
2025-09-05 20:17:26 +05:30
committed by GitHub

View File

@@ -3,10 +3,12 @@
import frappe
from frappe import _
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 +31,12 @@ def get_columns(filters):
return [
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 +44,7 @@ def get_columns(filters):
"State",
"Country",
"Is Primary Address:Check",
{"label": _("Contact"), "fieldtype": "Link", "options": "Contact", "hidden": 1},
"First Name",
"Last Name",
"Phone",