fix: task optimisation and test case fixes

This commit is contained in:
Nabin Hait
2019-04-12 11:24:32 +05:30
parent b42bbf1b6f
commit ea4c2c9e7d
9 changed files with 33 additions and 23 deletions

View File

@@ -241,7 +241,7 @@ class Project(Document):
from_expense_claim = frappe.db.sql("""select
sum(total_sanctioned_amount) as total_sanctioned_amount
from `tabExpense Claim` where project = %s
and docstatus = 1""", self.name, as_dict=1)[0]
and docstatus = 1""", self.name, as_dict=1, debug=1)[0]
self.actual_start_date = from_time_sheet.start_date
self.actual_end_date = from_time_sheet.end_date

View File

@@ -99,7 +99,7 @@ class Task(NestedSet):
def update_project(self):
if self.project and not self.flags.from_project:
frappe.get_doc("Project", self.project).update_percent_complete()
frappe.get_doc("Project", self.project).update_project()
def check_recursion(self):
if self.flags.ignore_recursion_check: return