diff --git a/erpnext/crm/report/lead_details/lead_details.py b/erpnext/crm/report/lead_details/lead_details.py index 98dfbec18be..608be6ec912 100644 --- a/erpnext/crm/report/lead_details/lead_details.py +++ b/erpnext/crm/report/lead_details/lead_details.py @@ -55,12 +55,13 @@ def get_columns(): "options": "Company", "width": 120, }, - {"fieldname": "address", "label": _("Address"), "fieldtype": "Data", "width": 130}, - {"fieldname": "state", "label": _("State"), "fieldtype": "Data", "width": 100}, - {"fieldname": "pincode", "label": _("Postal Code"), "fieldtype": "Data", "width": 90}, + {"label": _("Address"), "fieldname": "address", "fieldtype": "Data", "width": 130}, + {"label": _("Postal Code"), "fieldname": "pincode", "fieldtype": "Data", "width": 90}, + {"label": _("City"), "fieldname": "city", "fieldtype": "Data", "width": 100}, + {"label": _("State"), "fieldname": "state", "fieldtype": "Data", "width": 100}, { - "fieldname": "country", "label": _("Country"), + "fieldname": "country", "fieldtype": "Link", "options": "Country", "width": 100, @@ -93,8 +94,9 @@ def get_data(filters): lead.owner, lead.company, (Concat_ws(", ", address.address_line1, address.address_line2)).as_("address"), - address.state, address.pincode, + address.city, + address.state, address.country, ) .where(lead.company == filters.company) 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 a165b9f2ee7..11db4176702 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -31,9 +31,9 @@ def get_columns(filters): f"{frappe.unscrub(str(party_type_value))}::150", "Address Line 1", "Address Line 2", + "Postal Code", "City", "State", - "Postal Code", "Country", "Is Primary Address:Check", "First Name", diff --git a/erpnext/utilities/web_form/addresses/addresses.json b/erpnext/utilities/web_form/addresses/addresses.json index 4e2d8e36c2c..38b73926985 100644 --- a/erpnext/utilities/web_form/addresses/addresses.json +++ b/erpnext/utilities/web_form/addresses/addresses.json @@ -84,6 +84,18 @@ "reqd": 0, "show_in_filter": 0 }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "label": "Postal Code", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, { "allow_read_on_all_link_options": 0, "fieldname": "city", @@ -108,18 +120,7 @@ "reqd": 0, "show_in_filter": 0 }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "pincode", - "fieldtype": "Data", - "hidden": 0, - "label": "Postal Code", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, + { "allow_read_on_all_link_options": 1, "fieldname": "country",