chore: Remove heatmap from party dashboards

(cherry picked from commit a8f03e8baa)
This commit is contained in:
Deepesh Garg
2024-04-19 19:09:55 +05:30
committed by Mergify
parent 51a2b74db9
commit 410990b2a3
3 changed files with 0 additions and 54 deletions

View File

@@ -751,52 +751,6 @@ def validate_party_frozen_disabled(party_type, party_name):
frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), alert=True)
def get_timeline_data(doctype, name):
"""returns timeline data for the past one year"""
from frappe.desk.form.load import get_communication_data
out = {}
after = add_years(None, -1).strftime("%Y-%m-%d")
data = get_communication_data(
doctype,
name,
after=after,
group_by="group by communication_date",
fields="C.communication_date as communication_date, count(C.name)",
as_dict=False,
)
# fetch and append data from Activity Log
activity_log = frappe.qb.DocType("Activity Log")
data += (
frappe.qb.from_(activity_log)
.select(activity_log.communication_date, Count(activity_log.name))
.where(
(
((activity_log.reference_doctype == doctype) & (activity_log.reference_name == name))
| ((activity_log.timeline_doctype == doctype) & (activity_log.timeline_name == name))
| (
(activity_log.reference_doctype.isin(["Quotation", "Opportunity"]))
& (activity_log.timeline_name == name)
)
)
& (activity_log.status != "Success")
& (activity_log.creation > after)
)
.groupby(activity_log.communication_date)
.orderby(activity_log.communication_date, order=frappe.qb.desc)
).run()
timeline_items = dict(data)
for date, count in timeline_items.items():
timestamp = get_timestamp(date)
out.update({timestamp: count})
return out
def get_dashboard_info(party_type, party, loyalty_program=None):
current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)

View File

@@ -3,10 +3,6 @@ from frappe import _
def get_data():
return {
"heatmap": True,
"heatmap_message": _(
"This is based on transactions against this Supplier. See timeline below for details"
),
"fieldname": "supplier",
"non_standard_fieldnames": {"Payment Entry": "party", "Bank Account": "party"},
"transactions": [

View File

@@ -3,10 +3,6 @@ from frappe import _
def get_data():
return {
"heatmap": True,
"heatmap_message": _(
"This is based on transactions against this Customer. See timeline below for details"
),
"fieldname": "customer",
"non_standard_fieldnames": {
"Payment Entry": "party",