From 5cfe9c70c15977436dd2e15bc124d7b64eec6dcf Mon Sep 17 00:00:00 2001 From: robert schouten Date: Mon, 14 Nov 2016 14:39:46 +0800 Subject: [PATCH] [fix] show timeline_emails on timeline_docname (#2238) --- frappe/desk/form/load.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py index 2a1006c424..4abce35bfc 100644 --- a/frappe/desk/form/load.py +++ b/frappe/desk/form/load.py @@ -153,12 +153,16 @@ def get_communication_data(doctype, name, start=0, limit=20, after=None, fields= conditions = '''communication_type in ("Communication", "Comment") and ( (reference_doctype=%(doctype)s and reference_name=%(name)s) - or (timeline_doctype=%(doctype)s - and timeline_name=%(name)s - and communication_type="Comment" - and comment_type in ("Created", "Updated", "Submitted", "Cancelled", "Deleted")) - ) - and (comment_type is null or comment_type != 'Update')''' + or ( + (timeline_doctype=%(doctype)s and timeline_name=%(name)s) + and ( + communication_type="Communication" + or ( + communication_type="Comment" + and comment_type in ("Created", "Updated", "Submitted", "Cancelled", "Deleted") + ))) + )''' + if after: # find after a particular date