brotherton-erpnext/erpnext/patches/v5_4/update_purchase_cost_against_project.py

11 lines
362 B
Python
Raw Normal View History

2015-08-18 07:09:50 +00:00
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for p in frappe.get_all("Project", filters={"docstatus": 0}):
2015-08-18 07:09:50 +00:00
project = frappe.get_doc("Project", p.name)
project.update_purchase_costing()
project.save()