brotherton-erpnext/erpnext/templates/pages/task_info.py

16 lines
331 B
Python
Raw Normal View History

import frappe
def get_context(context):
context.no_cache = 1
2022-03-28 13:22:46 +00:00
task = frappe.get_doc("Task", frappe.form_dict.task)
2022-03-28 13:22:46 +00:00
context.comments = frappe.get_all(
"Communication",
filters={"reference_name": task.name, "comment_type": "comment"},
fields=["subject", "sender_full_name", "communication_date"],
)
context.doc = task