multiple minor fixes
This commit is contained in:
@@ -10,13 +10,15 @@ def execute():
|
||||
for m in frappe.get_all("Project Milestone", "*"):
|
||||
if (m.milestone and m.milestone_date
|
||||
and frappe.db.exists("Project", m.parent)):
|
||||
frappe.get_doc({
|
||||
task = frappe.get_doc({
|
||||
"doctype": "Task",
|
||||
"subject": m.milestone,
|
||||
"expected_start_date": m.milestone_date,
|
||||
"status": "Open" if m.status=="Pending" else "Closed",
|
||||
"project": m.parent,
|
||||
}).insert(ignore_permissions=True)
|
||||
})
|
||||
task.flags.ignore_mandatory = True
|
||||
task.insert(ignore_permissions=True)
|
||||
|
||||
# remove project milestone
|
||||
frappe.delete_doc("DocType", "Project Milestone")
|
||||
|
||||
Reference in New Issue
Block a user