From e52b9049fd4cb0494ba9a5dfd0d0cf31a345c21e Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Sun, 17 Dec 2023 17:17:30 +0530 Subject: [PATCH] docs: get_absolute_url --- frappe/utils/data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 6ce1f17362..cf9929c89f 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -1877,6 +1877,10 @@ def get_link_to_report( def get_absolute_url(doctype: str, name: str) -> str: + """Returns the absolute route for the form view of the given document in the desk. + + e.g. when doctype="Sales Invoice" and name="INV-00001", returns '/app/sales-invoice/INV-00001' + """ return f"/app/{quoted(slug(doctype))}/{quoted(name)}"