perf: Optimisation of project and task updation

This commit is contained in:
Nabin Hait
2019-04-10 18:06:53 +05:30
parent c768febac6
commit b42bbf1b6f
5 changed files with 14 additions and 21 deletions

View File

@@ -789,9 +789,8 @@ class PurchaseInvoice(BuyingController):
for d in self.items:
if d.project and d.project not in project_list:
project = frappe.get_doc("Project", d.project)
project.flags.dont_sync_tasks = True
project.update_purchase_costing()
project.save()
project.db_update()
project_list.append(d.project)
def validate_supplier_invoice(self):

View File

@@ -1022,9 +1022,8 @@ class SalesInvoice(SellingController):
def update_project(self):
if self.project:
project = frappe.get_doc("Project", self.project)
project.flags.dont_sync_tasks = True
project.update_billed_amount()
project.save()
project.db_update()
def verify_payment_amount_is_positive(self):