How to fetch Data from child table

When creating Project. Task automated fetch on the Project.

@hari.kishor Can you explain what you exactly want.
If you want fetch child table data from another DocType as like (Task and Project DocType) then you can check the below link:
https://raw.githubusercontent.com/frappe/erpnext/develop/erpnext/projects/doctype/project/project.py

There have how to load task in Project from Task DocType.

class Project(Document):
	def get_feed(self):
		return '{0}: {1}'.format(_(self.status), self.project_name)

	def onload(self):
		"""Load project tasks for quick view"""
		if not self.get('__unsaved') and not self.get("tasks"):
			self.load_tasks()

		self.set_onload('activity_summary', frappe.db.sql('''select activity_type,
			sum(hours) as total_hours
			from `tabTimesheet Detail` where project=%s and docstatus < 2 group by activity_type
			order by total_hours desc''', self.name, as_dict=True))

		self.update_costing()

	def __setup__(self):
		self.onload()

	def load_tasks(self):
		"""Load `tasks` from the database"""
		self.tasks = []
		for task in self.get_tasks():
			task_map = {
				"title": task.subject,
				"status": task.status,
				"start_date": task.exp_start_date,
				"end_date": task.exp_end_date,
				"description": task.description,
				"task_id": task.name,
				"task_weight": task.task_weight
			}

			self.map_custom_fields(task, task_map)

			self.append("tasks", task_map)

	def get_tasks(self):
		if self.name is None:
			return {}
		else:
			return frappe.get_all("Task", "*", {"project": self.name}, order_by="exp_start_date asc")

And look at the sync_task method how to update Task DocType From Project.

def sync_tasks(self):
		"""sync tasks and remove table"""
		if self.flags.dont_sync_tasks: return
		task_names = []
		for t in self.tasks:
			if t.task_id:
				task = frappe.get_doc("Task", t.task_id)
			else:
				task = frappe.new_doc("Task")
				task.project = self.name
			task.update({
				"subject": t.title,
				"status": t.status,
				"exp_start_date": t.start_date,
				"exp_end_date": t.end_date,
				"description": t.description,
				"task_weight": t.task_weight
			})

			self.map_custom_fields(t, task)

			task.flags.ignore_links = True
			task.flags.from_project = True
			task.flags.ignore_feed = True
			task.save(ignore_permissions=True)
			task_names.append(task.name)

		# delete
		for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}):
			frappe.delete_doc("Task", t.name)

		self.update_percent_complete()
		self.update_costing()

I want to write custom script to fetch task list when creating Project.

frappe.ui.form.on(“Projects”, “project_task_list”, function(frm, cdt, cdn) {
var itemname = locals[cdt][cdn][‘project_task_list’];
get_project_task_list(frm, cdt, cdn, itemname);
});

get_project_task_list = function(frm, cdt, cdn, itemname, child) {
frm.doc.task = [];
frappe.after_ajax(function() {

    frappe.call({
        "method": "frappe.client.get_list",
        args: {
            doctype: "Project Task",
            fieldname: ["Description", "Item Name"],
            filters: {
                parent: ["like", itemname]
            },
            'order_by': 'idx'
        },
        callback: function(data) {
                       $.each(data.message, function(i, d) {
                console.log(d.name);
                frappe.call({
                    "method": "frappe.client.get_value",
                    args: {
                        doctype: "Project Task",
                        fieldname: ["Description", "Task Name"],
                        filters: {
                            name: ["=", d.name]
                        }

                    },
                    callback: function(data) {
                        $.each(data, function(i, d) {
                            var row = frappe.model.add_child(cur_frm.doc, "project_task", "item");
                            row.task = d.task;
                            row.task_description = d.task_description;

                        });
                        refresh_field("task");
                    }
                });

            });
        }
    });
});

};

someone can help me please.