Merge pull request #3458 from nabinhait/develop

[fix] load tasks in project via __setup__ instead of onload function, to return tasks via get_doc
This commit is contained in:
Nabin Hait 2015-06-11 16:12:05 +05:30
commit d0df28bfa0

View File

@ -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,