From 960a1cbd8f965374c51c5f45b2a857f24bd4d958 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 19 Aug 2019 11:51:16 +0530 Subject: [PATCH] fix: Party dashboard heatmap not capturing sales, purchase and other activities (#18753) --- erpnext/accounts/party.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index cb947226518..e42f4af2a5d 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -469,7 +469,9 @@ def get_timeline_data(doctype, name): # fetch and append data from Activity Log data += frappe.db.sql("""select {fields} from `tabActivity Log` - where reference_doctype={doctype} and reference_name={name} + where (reference_doctype="{doctype}" and reference_name="{name}") + or (timeline_doctype in ("{doctype}") and timeline_name="{name}") + or (reference_doctype in ("Quotation", "Opportunity") and timeline_name="{name}") and status!='Success' and creation > {after} {group_by} order by creation desc """.format(doctype=frappe.db.escape(doctype), name=frappe.db.escape(name), fields=fields,