[fix] load task table for project on saving of project
This commit is contained in:
parent
838dd6c530
commit
38d261653f
@ -15,7 +15,7 @@ class Project(Document):
|
||||
|
||||
def onload(self):
|
||||
"""Load project tasks for quick view"""
|
||||
if not self.get("tasks"):
|
||||
if not self.get('__unsaved') and not self.get("tasks"):
|
||||
self.load_tasks()
|
||||
|
||||
self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
|
||||
@ -151,6 +151,10 @@ class Project(Document):
|
||||
frappe.sendmail(user.user, subject=_("Project Collaboration Invitation"), content=content.format(*messages))
|
||||
user.welcome_email_sent=1
|
||||
|
||||
def on_update(self):
|
||||
self.load_tasks()
|
||||
self.sync_tasks()
|
||||
|
||||
def get_timeline_data(doctype, name):
|
||||
'''Return timeline for attendance'''
|
||||
return dict(frappe.db.sql('''select unix_timestamp(from_time), count(*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user