2016-06-24 10:46:07 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2016-06-24 10:46:07 +00:00
|
|
|
def get_context(context):
|
2016-07-05 06:42:39 +00:00
|
|
|
if frappe.form_dict.project:
|
|
|
|
context.parents = [{'title': frappe.form_dict.project, 'route': '/projects?project='+ frappe.form_dict.project}]
|
2016-08-05 16:14:34 +00:00
|
|
|
context.success_url = "/projects?project=" + frappe.form_dict.project
|
2021-08-19 08:11:10 +00:00
|
|
|
|
2016-07-05 06:42:39 +00:00
|
|
|
elif context.doc and context.doc.get('project'):
|
2016-08-05 16:14:34 +00:00
|
|
|
context.parents = [{'title': context.doc.project, 'route': '/projects?project='+ context.doc.project}]
|
|
|
|
context.success_url = "/projects?project=" + context.doc.project
|