Merge pull request #40049 from frappe/mergify/bp/version-15-hotfix/pr-39828

fix: translate Sales Pipeline Analytics report (backport #39828)
This commit is contained in:
ruthra kumar 2024-02-22 20:46:55 +05:30 committed by GitHub
commit a3ddd326d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,9 @@ class SalesPipelineAnalytics(object):
month_list = self.get_month_list()
for month in month_list:
self.columns.append({"fieldname": month, "fieldtype": based_on, "label": month, "width": 200})
self.columns.append(
{"fieldname": month, "fieldtype": based_on, "label": _(month), "width": 200}
)
elif self.filters.get("range") == "Quarterly":
for quarter in range(1, 5):
@ -156,7 +158,7 @@ class SalesPipelineAnalytics(object):
for column in self.columns:
if column["fieldname"] != "opportunity_owner" and column["fieldname"] != "sales_stage":
labels.append(column["fieldname"])
labels.append(_(column["fieldname"]))
self.chart = {"data": {"labels": labels, "datasets": datasets}, "type": "line"}