From d015dfce92da7e3baa1680f3462358c864047b79 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 11 Feb 2013 15:10:53 +0530 Subject: [PATCH] sales communication fix for status --- selling/doctype/lead/get_leads.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selling/doctype/lead/get_leads.py b/selling/doctype/lead/get_leads.py index c5e1434e5f..d1a4a3d411 100644 --- a/selling/doctype/lead/get_leads.py +++ b/selling/doctype/lead/get_leads.py @@ -24,7 +24,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None, stat def set_status(doctype, name): w = webnotes.model_wrapper(doctype, name) w.ignore_permissions = True - w.doc.status = status + w.doc.status = is_system_user and "Replied" or status w.doc.save() if mail: mail.save_attachments_in_doc(w.doc) @@ -50,9 +50,9 @@ def add_sales_communication(subject, content, sender, real_name, mail=None, stat lead=lead_name, contact=contact_name) if contact_name: - doc = set_status("Contact", contact_name, is_system_user and "Replied" or status) + set_status("Contact", contact_name) elif lead_name: - doc set_status("Lead", lead_name, is_system_user and "Replied" or status) + set_status("Lead", lead_name) class SalesMailbox(POP3Mailbox):