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')] | 	numbers = [doc.get('phone'), doc.get('mobile_no')] | ||||||
| 	for_doc = doc.doctype.lower() | 	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: | 	for number in numbers: | ||||||
| 		if not number: continue | 		if not number: continue | ||||||
| 		print(number) | 
 | ||||||
| 		filters = frappe._dict({ | 		filters = frappe._dict({ | ||||||
| 			'from': ['like', '%{}'.format(number.lstrip('0'))], | 			'from': ['like', '%{}'.format(number.lstrip('0'))], | ||||||
| 			for_doc: '' | 			for_doc: '' | ||||||
|  | |||||||
| @ -1,7 +1,6 @@ | |||||||
| import frappe | import frappe | ||||||
| from frappe import _ | from frappe import _ | ||||||
| import json | import json | ||||||
| from frappe.contacts.doctype.contact.contact import get_contact_with_phone_number |  | ||||||
| 
 | 
 | ||||||
| @frappe.whitelist() | @frappe.whitelist() | ||||||
| def get_last_interaction(contact=None, lead=None): | def get_last_interaction(contact=None, lead=None): | ||||||
|  | |||||||
| @ -3,7 +3,6 @@ | |||||||
| # For license information, please see license.txt | # For license information, please see license.txt | ||||||
| 
 | 
 | ||||||
| from __future__ import unicode_literals | from __future__ import unicode_literals | ||||||
| # import frappe |  | ||||||
| from frappe.model.document import Document | from frappe.model.document import Document | ||||||
| import requests | import requests | ||||||
| import frappe | import frappe | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user