'Set timeline_doctype and timeline_name'

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
