mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 17:55:40 +00:00
[fix] load tasks in project via __setup__ instead of onload function, to return tasks via get_doc
This commit is contained in:
@@ -13,8 +13,9 @@ class Project(Document):
|
||||
def get_feed(self):
|
||||
return '{0}: {1}'.format(_(self.status), self.project_name)
|
||||
|
||||
def onload(self):
|
||||
def __setup__(self):
|
||||
"""Load project tasks for quick view"""
|
||||
self.tasks = []
|
||||
for task in frappe.get_all("Task", "*", {"project": self.name}, order_by="exp_start_date asc"):
|
||||
self.append("tasks", {
|
||||
"title": task.subject,
|
||||
|
||||
Reference in New Issue
Block a user