brotherton-erpnext/patches/june_2013/p02_update_project_completed.py

9 lines
343 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
webnotes.reload_doc("projects", "doctype", "project")
for p in webnotes.conn.sql_list("""select name from tabProject"""):
webnotes.bean("Project", p).make_controller().update_percent_complete()