mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
Merge pull request #46996 from Sanket322/contact_adress_in_add_column
fix: Allow adding Address/Contact fields to `Address And Contacts` report
This commit is contained in:
@@ -3,10 +3,12 @@
|
|||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
field_map = {
|
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": [
|
"Address": [
|
||||||
|
"name",
|
||||||
"address_line1",
|
"address_line1",
|
||||||
"address_line2",
|
"address_line2",
|
||||||
"city",
|
"city",
|
||||||
@@ -29,6 +31,12 @@ def get_columns(filters):
|
|||||||
columns = [
|
columns = [
|
||||||
f"{party_type}:Link/{party_type}",
|
f"{party_type}:Link/{party_type}",
|
||||||
f"{frappe.unscrub(str(party_type_value))}::150",
|
f"{frappe.unscrub(str(party_type_value))}::150",
|
||||||
|
{
|
||||||
|
"label": _("Address"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Address",
|
||||||
|
"hidden": 1,
|
||||||
|
},
|
||||||
"Address Line 1",
|
"Address Line 1",
|
||||||
"Address Line 2",
|
"Address Line 2",
|
||||||
"Postal Code",
|
"Postal Code",
|
||||||
@@ -36,6 +44,7 @@ def get_columns(filters):
|
|||||||
"State",
|
"State",
|
||||||
"Country",
|
"Country",
|
||||||
"Is Primary Address:Check",
|
"Is Primary Address:Check",
|
||||||
|
{"label": _("Contact"), "fieldtype": "Link", "options": "Contact", "hidden": 1},
|
||||||
"First Name",
|
"First Name",
|
||||||
"Last Name",
|
"Last Name",
|
||||||
"Phone",
|
"Phone",
|
||||||
|
|||||||
Reference in New Issue
Block a user