From e63f3b2f36fe3cbfec6278b59902974f00f6b906 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Fri, 23 Apr 2021 20:33:42 +0530 Subject: [PATCH] fix: standard working hours message and link for HR Settings --- .../project_profitability/project_profitability.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/projects/report/project_profitability/project_profitability.py b/erpnext/projects/report/project_profitability/project_profitability.py index 593ce1b22b..23e8f79b45 100644 --- a/erpnext/projects/report/project_profitability/project_profitability.py +++ b/erpnext/projects/report/project_profitability/project_profitability.py @@ -21,11 +21,13 @@ def get_rows(filters): conditions = get_conditions(filters) standard_working_hours = frappe.db.get_single_value("HR Settings", "standard_working_hours") if not standard_working_hours: - hr_settings = "HR Settings" - frappe.msgprint(_("The metrics for this report are calculated based on the Standard Working Hours. Please set Standard Working Hours in {0}.").format(hr_settings)) + msg = _("The metrics for this report are calculated based on the Standard Working Hours. Please set {0} in {1}.").format( + frappe.bold("Standard Working Hours"), frappe.utils.get_link_to_form("HR Settings", "HR Settings")) + + frappe.msgprint(msg) return [] - sql = """ + sql = """ SELECT * FROM @@ -74,7 +76,7 @@ def get_conditions(filters): if filters.get("project"): conditions.append("tabTimesheet.parent_project={0}".format(frappe.db.escape(filters.get("project")))) - + conditions = " and ".join(conditions) return conditions