Merge pull request #3537 from neilLasrado/project
Fixed Issues in Project Task
This commit is contained in:
commit
ec44fa95ce
@ -166,4 +166,6 @@ erpnext.patches.v5_0.portal_fixes
|
||||
erpnext.patches.v5_0.reset_values_in_tools
|
||||
execute:frappe.delete_doc("Page", "users")
|
||||
erpnext.patches.v5_0.update_material_transferred_for_manufacturing_again
|
||||
erpnext.patches.v5_0.index_on_account_and_gl_entry
|
||||
erpnext.patches.v5_0.index_on_account_and_gl_entry
|
||||
execute:frappe.db.sql("""delete from `tabProject Task`""")
|
||||
|
||||
|
@ -35,6 +35,7 @@ class Project(Document):
|
||||
def validate(self):
|
||||
self.validate_dates()
|
||||
self.sync_tasks()
|
||||
self.tasks = []
|
||||
|
||||
def validate_dates(self):
|
||||
if self.expected_start_date and self.expected_end_date:
|
||||
@ -70,8 +71,6 @@ class Project(Document):
|
||||
for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}):
|
||||
frappe.delete_doc("Task", t.name)
|
||||
|
||||
self.tasks = []
|
||||
|
||||
def update_percent_complete(self):
|
||||
total = frappe.db.sql("""select count(*) from tabTask where project=%s""",
|
||||
self.name)[0][0]
|
||||
|
Loading…
Reference in New Issue
Block a user