def set_timeline_doc(self):
		parent_doc = self.get_parent_doc()
		if (self.timeline_doctype and self.timeline_name) or not parent_doc:
			return

		timeline_field = parent_doc.meta.timeline_field
		if not timeline_field:
			return

		doctype = parent_doc.meta.get_link_doctype(timeline_field)
		name = parent_doc.get(timeline_field)

		if doctype and name:
			self.timeline_doctype = doctype
			self.timeline_name = name

		else:
			return
Set timeline_doctype and timeline_name
dataset/ETHPy150Open frappe/frappe/frappe/core/doctype/communication/communication.py/Communication.set_timeline_doc