AttirbuteError: "CustomDocument" object has no attribute ""

We are creating a custom document that once submitted will allow us to add or create a record to another document from the data entered. how ever I have encountered an error “object has no attribute”
frappe.ui.form.on(‘Custom Document’, {
make_timesheet: function(frm) {
frappe.confirm(__(‘This action will create or add entry to existingdoc. Do you want to proceed?’),
function() {{
method: “”,
args: {
“dc”: frm.doc,
“dt”: frm.doc.doctype,
callback: function() {;},
doc: frm.doc,
freeze: true,
freeze_message: ‘Creating or updating existingdoc…’
function() {
if(frappe.dom.freeze_count) {

    from __future__ import unicode_literals
    import frappe
    from frappe.model.document import Document

    import json
    from datetime import timedelta
    from erpnext.controllers.queries import get_match_cond
    from frappe.utils import flt, time_diff_in_hours, get_datetime, getdate, cint
    from frappe.model.document import Document
    class CustomDocumentTool(Document):
      def make_existingdocs(doc,dt,dn):
        for employee_data in doc.employee_log:
          edoc = get_employee_existingdoc(employee_data.employee,doc.for_date)
          if not edoc:
            edoc = frappe.new_doc({"doctype":"ExistingDocument","company","employee":employee_data.employee})

The whitelisted methods should be indented outside the class. Try if this works