From 1f99bea6ce80ace11d133f07fb61eaa67dad5c96 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 25 Oct 2017 11:44:12 +0530 Subject: [PATCH] Pass sender as contact email in Opportunity (#11308) Always pass sender as the contact email while creating an opportunity for a website enquiry. --- erpnext/templates/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index 6ebe41185f..7ee39602f5 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -28,11 +28,12 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): )).insert(ignore_permissions=True) opportunity = frappe.get_doc(dict( - doctype='Opportunity', + doctype ='Opportunity', enquiry_from = 'Customer' if customer else 'Lead', status = 'Open', title = subject, - to_discuss=message + contact_email = sender, + to_discuss = message )) if customer: