
from __future__ import unicode_literals
import frappe

def execute():
	for p in frappe.get_all("Project"):
		project = frappe.get_doc("Project", p.name)
		project.update_purchase_costing()
		project.save()

from __future__ import unicode_literals
import frappe

def execute():
	for p in frappe.get_all("Project", filters={"docstatus": 0}):
		project = frappe.get_doc("Project", p.name)
		project.update_purchase_costing()
		project.save()
Update project cost for draft project only
[fix] Update project cost for draft project only

  
  from __future__ import unicode_literals
  import frappe
  
  def execute():
- 	for p in frappe.get_all("Project"):
+ 	for p in frappe.get_all("Project", filters={"docstatus": 0}):
  		project = frappe.get_doc("Project", p.name)
  		project.update_purchase_costing()
  		project.save()
Update project cost for draft project only
## Code Before:

from __future__ import unicode_literals
import frappe

def execute():
	for p in frappe.get_all("Project"):
		project = frappe.get_doc("Project", p.name)
		project.update_purchase_costing()
		project.save()
## Instruction:
Update project cost for draft project only
## Code After:

from __future__ import unicode_literals
import frappe

def execute():
	for p in frappe.get_all("Project", filters={"docstatus": 0}):
		project = frappe.get_doc("Project", p.name)
		project.update_purchase_costing()
		project.save()