brotherton-erpnext/erpnext/patches/v4_2/update_project_milestones.py
2014-08-08 14:49:53 +05:30

9 lines
301 B
Python

import frappe
def execute():
for project in frappe.db.sql_list("select name from tabProject"):
frappe.reload_doc("projects", "doctype", "project")
p = frappe.get_doc("Project", project)
p.update_milestones_completed()
p.db_set("percent_milestones_completed", p.percent_milestones_completed)