fix: make contact structure call popup compatible

This commit is contained in:
Himanshu Warekar 2019-08-21 13:36:41 +05:30
parent ea97a6cb5b
commit c6e02e2a74
3 changed files with 5 additions and 3 deletions

View File

@ -70,9 +70,13 @@ def set_caller_information(doc, state):
numbers = [doc.get('phone'), doc.get('mobile_no')]
for_doc = doc.doctype.lower()
# Contact now has all the nos saved in child table
if doc.doctype == 'Contact':
numbers = [nos.phone for nos in doc.phone_nos]
for number in numbers:
if not number: continue
print(number)
filters = frappe._dict({
'from': ['like', '%{}'.format(number.lstrip('0'))],
for_doc: ''

View File

@ -1,7 +1,6 @@
import frappe
from frappe import _
import json
from frappe.contacts.doctype.contact.contact import get_contact_with_phone_number
@frappe.whitelist()
def get_last_interaction(contact=None, lead=None):

View File

@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
import requests
import frappe