Merge pull request #7193 from KanchanChauhan/get-project-task

Show only Project tasks in depends on tasks
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index c6b6664..7c4eb80 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -67,4 +67,12 @@
 
 });
 
+cur_frm.fields_dict['depends_on'].grid.get_field('task').get_query = function(doc) {
+	if(doc.project) {
+		return {
+			filters: {'project': doc.project}
+		}
+	}
+}
+
 cur_frm.add_fetch('task', 'subject', 'subject');