mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
18 lines
576 B
Python
18 lines
576 B
Python
import urllib.parse
|
|
|
|
import frappe
|
|
|
|
|
|
def get_context(context):
|
|
if project := frappe.form_dict.project:
|
|
title = frappe.utils.data.escape_html(project)
|
|
route = "/projects?" + urllib.parse.urlencode({"project": project})
|
|
context.parents = [{"title": title, "route": route}]
|
|
context.success_url = route
|
|
|
|
elif context.doc and (project := context.doc.get("project")):
|
|
title = frappe.utils.data.escape_html(project)
|
|
route = "/projects?" + urllib.parse.urlencode({"project": project})
|
|
context.parents = [{"title": title, "route": route}]
|
|
context.success_url = route
|