diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index d2e907d162..8c1ab2f38f 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -33,7 +33,6 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({ frappe.dynamic_link = { doc: doc, fieldname: 'name', doctype: 'Lead' } if(!doc.__islocal && doc.__onload && !doc.__onload.is_customer) { - this.frm.add_custom_button(__("Call"), this.call); this.frm.add_custom_button(__("Customer"), this.create_customer, __('Create')); this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __('Create')); this.frm.add_custom_button(__("Quotation"), this.make_quotation, __('Create')); @@ -53,14 +52,6 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({ }) }, - call: () => { - frappe.xcall('erpnext.erpnext_integrations.exotel_integration.make_a_call', { - 'to_number': this.frm.doc.phone, - 'from_number': '', - 'caller_id': '09513886363' - }).then(console.log) - }, - create_opportunity: function () { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_opportunity", diff --git a/erpnext/crm/doctype/utils.py b/erpnext/crm/doctype/utils.py index 68b5d1fd18..b424ac3878 100644 --- a/erpnext/crm/doctype/utils.py +++ b/erpnext/crm/doctype/utils.py @@ -56,7 +56,7 @@ def get_last_interaction(number, reference_doc): }, ['name', 'subject', 'customer'], limit=1) elif reference_doc.doctype == 'Lead': - last_communication = frappe.get_all('Communication', { + last_communication = frappe.get_all('Communication', filters={ 'reference_doctype': reference_doc.doctype, 'reference_name': reference_doc.name, 'sent_or_received': 'Received' diff --git a/erpnext/erpnext_integrations/exotel_integration.py b/erpnext/erpnext_integrations/exotel_integration.py index bace40ff62..4e88c5b03a 100644 --- a/erpnext/erpnext_integrations/exotel_integration.py +++ b/erpnext/erpnext_integrations/exotel_integration.py @@ -1,5 +1,5 @@ import frappe -from erpnext.crm.doctype.utils import get_document_with_phone_number, get_employee_emails_for_popup +from erpnext.crm.doctype.utils import get_employee_emails_for_popup import requests # api/method/erpnext.erpnext_integrations.exotel_integration.handle_incoming_call diff --git a/erpnext/public/js/call_popup/call_popup.js b/erpnext/public/js/call_popup/call_popup.js index f994b772a7..4df2321d18 100644 --- a/erpnext/public/js/call_popup/call_popup.js +++ b/erpnext/public/js/call_popup/call_popup.js @@ -175,7 +175,6 @@ class CallPopup { if (data.last_communication) { const comm = data.last_communication; comm_field.set_value(comm.content); - comm_field.$wrapper.append(frappe.utils.get_form_link('Communication', comm.name)); } if (data.last_issue) { @@ -183,7 +182,7 @@ class CallPopup { const issue_field = this.dialog.fields_dict["last_issue"]; issue_field.set_value(issue.subject); issue_field.$wrapper.append(` - View all issues from ${issue.customer} + ${__('View all issues from {0}', [issue.customer])} `); } });