set contact and customer in issue

This commit is contained in:
Nabin Hait 2015-05-17 10:39:06 +05:30
parent 1fe50120a3
commit 26c8a96b0a

View File

@ -26,7 +26,7 @@ class Issue(Document):
def set_lead_contact(self, email_id):
import email.utils
email_id = email.utils.parseaddr(email_id)
email_id = email.utils.parseaddr(email_id)[1]
if email_id:
if not self.lead:
self.lead = frappe.db.get_value("Lead", {"email_id": email_id})