diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index 94f924243cc..c1405c374fd 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -34,6 +34,8 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): if customer: opportunity.customer = customer + elif lead: + opportunity.lead = lead else: opportunity.lead = new_lead.name