fix: make contact structure call popup compatible
This commit is contained in:
parent
ea97a6cb5b
commit
c6e02e2a74
@ -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: ''
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user