From df019807a9b7d82d8e7445c716a9f58b320721fb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 4 Dec 2013 16:27:30 +0530 Subject: [PATCH] In Website Contact form, if Support is selected from first dropdown, a Support Ticket should be created instead of a Lead Communication --- portal/utils.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/portal/utils.py b/portal/utils.py index 16fc0723d7..89800f3e1d 100644 --- a/portal/utils.py +++ b/portal/utils.py @@ -64,9 +64,14 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): if not website_send_message(subject, message, sender): return - - # make lead / communication - from selling.doctype.lead.get_leads import add_sales_communication - add_sales_communication(subject or "Website Query", message, sender, sender, - mail=None, status=status) + + if subject=="Support": + # create support ticket + from support.doctype.support_ticket.get_support_mails import add_support_communication + add_support_communication(subject, message, sender, mail=None) + else: + # make lead / communication + from selling.doctype.lead.get_leads import add_sales_communication + add_sales_communication(subject or "Website Query", message, sender, sender, + mail=None, status=status) \ No newline at end of file