chore: rename app to desk in get url methods
This commit is contained in:
parent
61cd779872
commit
0e3ff92996
1 changed files with 8 additions and 8 deletions
|
|
@ -1969,7 +1969,7 @@ def get_absolute_url(doctype: str, name: str) -> str:
|
|||
|
||||
e.g. when doctype="Sales Invoice" and name="INV-00001", returns '/app/sales-invoice/INV-00001'
|
||||
"""
|
||||
return f"/app/{quoted(slug(doctype))}/{quoted(name)}"
|
||||
return f"/desk/{quoted(slug(doctype))}/{quoted(name)}"
|
||||
|
||||
|
||||
def get_url_to_form(doctype: str, name: str | None = None) -> str:
|
||||
|
|
@ -1979,9 +1979,9 @@ def get_url_to_form(doctype: str, name: str | None = None) -> str:
|
|||
returns 'https://frappe.io/app/sales-invoice/INV-00001'
|
||||
"""
|
||||
if not name:
|
||||
uri = f"/app/{quoted(slug(doctype))}"
|
||||
uri = f"/desk/{quoted(slug(doctype))}"
|
||||
else:
|
||||
uri = f"/app/{quoted(slug(doctype))}/{quoted(name)}"
|
||||
uri = f"/desk/{quoted(slug(doctype))}/{quoted(name)}"
|
||||
|
||||
return get_url(uri=uri)
|
||||
|
||||
|
|
@ -1992,7 +1992,7 @@ def get_url_to_list(doctype: str) -> str:
|
|||
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))}")
|
||||
return get_url(uri=f"/desk/{quoted(slug(doctype))}")
|
||||
|
||||
|
||||
def get_url_to_report(name, report_type: str | None = None, doctype: str | None = None) -> str:
|
||||
|
|
@ -2006,17 +2006,17 @@ def get_url_to_report(name, report_type: str | None = None, doctype: str | None
|
|||
get_url_to_report("Revenue", "Report Builder", "Sales Invoice") -> 'https://frappe.io/app/sales-invoice/view/report/Revenue'
|
||||
"""
|
||||
if report_type == "Report Builder":
|
||||
return get_url(uri=f"/app/{quoted(slug(doctype))}/view/report/{quoted(name)}")
|
||||
return get_url(uri=f"/desk/{quoted(slug(doctype))}/view/report/{quoted(name)}")
|
||||
else:
|
||||
return get_url(uri=f"/app/query-report/{quoted(name)}")
|
||||
return get_url(uri=f"/desk/query-report/{quoted(name)}")
|
||||
|
||||
|
||||
def get_url_to_report_with_filters(name, filters, report_type=None, doctype=None):
|
||||
"""Return the absolute URL for the report in the desk with filters."""
|
||||
if report_type == "Report Builder":
|
||||
return get_url(uri=f"/app/{quoted(slug(doctype))}/view/report?{filters}")
|
||||
return get_url(uri=f"/desk/{quoted(slug(doctype))}/view/report?{filters}")
|
||||
|
||||
return get_url(uri=f"/app/query-report/{quoted(name)}?{filters}")
|
||||
return get_url(uri=f"/desk/query-report/{quoted(name)}?{filters}")
|
||||
|
||||
|
||||
def get_filtered_list_url(doctype: str, docnames: list[str] | None = None) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue