From 93a5a60003ef2541012c501feb73a1f56b8d2e13 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Sun, 17 Dec 2023 17:22:15 +0530 Subject: [PATCH] doc: get_url_to_list --- frappe/utils/data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index cf9929c89f..f693d0e095 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -1889,6 +1889,11 @@ def get_url_to_form(doctype: str, name: str) -> str: def get_url_to_list(doctype: str) -> str: + """Returns the absolute URL for the list view of the given document in the desk. + + e.g. when doctype="Sales Invoice" and your site URL is "https://frappe.io", + returns 'https://frappe.io/app/sales-invoice' + """ return get_url(uri=f"/app/{quoted(slug(doctype))}")