diff --git a/erpnext/crm/doctype/utils.py b/erpnext/crm/doctype/utils.py index 885ef0584d2..4ccd9bd73b6 100644 --- a/erpnext/crm/doctype/utils.py +++ b/erpnext/crm/doctype/utils.py @@ -81,4 +81,4 @@ def strip_number(number): # strip 0 from the start of the number for proper number comparisions # eg. 07888383332 should match with 7888383332 number = number.lstrip('0') - return number \ No newline at end of file + return number diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 5430221d66e..c7efbbad8d0 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -272,12 +272,9 @@ doc_events = { }, "Contact": { "on_trash": "erpnext.support.doctype.issue.issue.update_issue", - "after_insert": "erpnext.telephony.doctype.call_log.call_log.set_caller_information", + "after_insert": "erpnext.telephony.doctype.call_log.call_log.link_existing_conversations", "validate": "erpnext.crm.utils.update_lead_phone_numbers" }, - "Lead": { - "after_insert": "erpnext.telephony.doctype.call_log.call_log.set_caller_information" - }, "Email Unsubscribe": { "after_insert": "erpnext.crm.doctype.email_campaign.email_campaign.unsubscribe_recipient" }, @@ -582,3 +579,7 @@ global_search_doctypes = { {'doctype': 'Hotel Room Type', 'index': 4} ] } + +additional_timeline_content = { + '*': ['erpnext.telephony.doctype.call_log.call_log.get_linked_call_logs'] +} diff --git a/erpnext/public/build.json b/erpnext/public/build.json index b4a1cf81be4..b2897852f05 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -42,7 +42,8 @@ "public/js/hub/hub_factory.js", "public/js/call_popup/call_popup.js", "public/js/utils/dimension_tree_filter.js", - "public/js/telephony.js" + "public/js/telephony.js", + "public/js/templates/call_link.html" ], "js/item-dashboard.min.js": [ "stock/dashboard/item_dashboard.html", diff --git a/erpnext/public/js/templates/call_link.html b/erpnext/public/js/templates/call_link.html new file mode 100644 index 00000000000..08bdf142a70 --- /dev/null +++ b/erpnext/public/js/templates/call_link.html @@ -0,0 +1,43 @@ +