[project] [event] fix in creation of event
This commit is contained in:
parent
670199b9c6
commit
f09a9f68e4
@ -73,17 +73,18 @@ class DocType:
|
||||
|
||||
# add events
|
||||
for milestone in self.doclist.get({"parentfield": "project_milestones"}):
|
||||
description = milestone.milestone + " for " + self.doc.name
|
||||
webnotes.bean({
|
||||
"doctype": "Event",
|
||||
"owner": self.doc.owner,
|
||||
"subject": description,
|
||||
"description": description,
|
||||
"starts_on": milestone.milestone_date + " 10:00:00",
|
||||
"event_type": "Private",
|
||||
"ref_type": self.doc.doctype,
|
||||
"ref_name": self.doc.name
|
||||
}).insert()
|
||||
if milestone.milestone_date:
|
||||
description = (milestone.milestone or "Milestone") + " for " + self.doc.name
|
||||
webnotes.bean({
|
||||
"doctype": "Event",
|
||||
"owner": self.doc.owner,
|
||||
"subject": description,
|
||||
"description": description,
|
||||
"starts_on": milestone.milestone_date + " 10:00:00",
|
||||
"event_type": "Private",
|
||||
"ref_type": self.doc.doctype,
|
||||
"ref_name": self.doc.name
|
||||
}).insert()
|
||||
|
||||
def on_trash(self):
|
||||
self.delete_events()
|
||||
|
Loading…
x
Reference in New Issue
Block a user