From fd85b1689d38a746387044597ce9fbf2f0571a90 Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Mon, 2 Sep 2019 12:10:15 +0530 Subject: [PATCH] fix: review fixes --- erpnext/communication/doctype/call_log/call_log.py | 2 +- erpnext/crm/doctype/opportunity/test_opportunity.py | 6 +++--- erpnext/public/js/templates/contact_list.html | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/communication/doctype/call_log/call_log.py b/erpnext/communication/doctype/call_log/call_log.py index 411f56c5ec..35c31a0bf8 100644 --- a/erpnext/communication/doctype/call_log/call_log.py +++ b/erpnext/communication/doctype/call_log/call_log.py @@ -75,7 +75,7 @@ def set_caller_information(doc, state): # Contact now has all the nos saved in child table if doc.doctype == 'Contact': - numbers = [nos.phone for nos in doc.phone_nos] + numbers = [d.phone for d in doc.phone_nos] for number in numbers: number = strip_number(number) diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.py b/erpnext/crm/doctype/opportunity/test_opportunity.py index 8927d93027..8f61edf00e 100644 --- a/erpnext/crm/doctype/opportunity/test_opportunity.py +++ b/erpnext/crm/doctype/opportunity/test_opportunity.py @@ -45,7 +45,7 @@ class TestOpportunity(unittest.TestCase): # create new customer and create new contact against 'new.opportunity@example.com' customer = make_customer(opp_doc.party_name).insert(ignore_permissions=True) - d = frappe.get_doc({ + contact = frappe.get_doc({ "doctype": "Contact", "first_name": "_Test Opportunity Customer", "links": [{ @@ -53,8 +53,8 @@ class TestOpportunity(unittest.TestCase): "link_name": customer.name }] }) - d.add_email(new_lead_email_id) - d.insert(ignore_permissions=True) + contact.add_email(new_lead_email_id) + contact.insert(ignore_permissions=True) opp_doc = frappe.get_doc(args).insert(ignore_permissions=True) self.assertTrue(opp_doc.party_name) diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html index 8dd220f72d..da7b059fcd 100644 --- a/erpnext/public/js/templates/contact_list.html +++ b/erpnext/public/js/templates/contact_list.html @@ -21,7 +21,7 @@ {% endif %} {% if(contact_list[i].phone_nos) { %} {% for(var j=0, k=contact_list[i].phone_nos.length; j + {%= __("Phone") %}: {%= contact_list[i].phone_nos[j].phone %}
{% } %} {% endif %}

@@ -31,14 +31,14 @@ {% endif %} {% if(contact_list[i].email_ids) { %} {% for(var j=0, k=contact_list[i].email_ids.length; j + {%= __("Email") %}: {%= contact_list[i].email_ids[j].email_id %}
{% } %} {% endif %}

{% endif %}

{% if (contact_list[i].address) { %} - {%= __("Address ") %}: {%= contact_list[i].address %}
+ {%= __("Address") %}: {%= contact_list[i].address %}
{% endif %}