Pass sender as contact email in Opportunity (#11308)

Always pass sender as the contact email while creating an opportunity for a website enquiry.
This commit is contained in:
Neil Trini Lasrado 2017-10-25 11:44:12 +05:30 committed by Nabin Hait
parent a5eee4629f
commit 1f99bea6ce

View File

@ -28,11 +28,12 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
)).insert(ignore_permissions=True) )).insert(ignore_permissions=True)
opportunity = frappe.get_doc(dict( opportunity = frappe.get_doc(dict(
doctype='Opportunity', doctype ='Opportunity',
enquiry_from = 'Customer' if customer else 'Lead', enquiry_from = 'Customer' if customer else 'Lead',
status = 'Open', status = 'Open',
title = subject, title = subject,
to_discuss=message contact_email = sender,
to_discuss = message
)) ))
if customer: if customer: