Update sales_order.py

This commit is contained in:
superlack 2017-02-24 12:35:10 -08:00 committed by GitHub
parent f800892ec3
commit c95ebdb4e4

View File

@ -174,13 +174,12 @@ class SalesOrder(SellingController):
def update_project(self): def update_project(self):
project_list = [] project_list = []
for d in self.items: if self.project:
if d.project and d.project not in project_list: project = frappe.get_doc("Project", self.project)
project = frappe.get_doc("Project", d.project)
project.flags.dont_sync_tasks = True project.flags.dont_sync_tasks = True
project.update_sales_costing() project.update_sales_costing()
project.save() project.save()
project_list.append(d.project) project_list.append(self.project)
def check_credit_limit(self): def check_credit_limit(self):
from erpnext.selling.doctype.customer.customer import check_credit_limit from erpnext.selling.doctype.customer.customer import check_credit_limit