feat(Contacts): Multiple Emails in a Contact (#18675)
* feat: render multiple addresses
* feat: move to newer contacts structure
* fix: iterate over valid variable
* fix: use primary label instead of bold letters
* fix: call popup get contact name from number
* fix: make contact structure call popup compatible
* fix: query
* fix: add city, state and country
* fix: display address
* fix: get address in single line
* fix: review fixes
* fix: translation strings
* fix: fix query for contacts
* fix: remove references of mobile_no
diff --git a/erpnext/hub_node/legacy.py b/erpnext/hub_node/legacy.py
index 95ada76..85eb1b2 100644
--- a/erpnext/hub_node/legacy.py
+++ b/erpnext/hub_node/legacy.py
@@ -68,12 +68,13 @@
contact = frappe.get_doc({
'doctype': 'Contact',
'first_name': supplier.supplier_name,
- 'email_id': supplier.supplier_email,
'is_primary_contact': 1,
'links': [
{'link_doctype': 'Supplier', 'link_name': supplier.supplier_name}
]
- }).insert()
+ })
+ contact.add_email(supplier.supplier_email)
+ contact.insert()
else:
contact = frappe.get_doc('Contact', contact_name)