After Creating Virtual Doctype in frappe ERPnext I get this Error

after following these steps in documentation (Virtual DocTypes) for creating virtual doctype it shows the following error without adding any custom code

AttributeError: 'CustomerSubEntry' object has no attribute '_table_fieldnames'

console log shows this error:

Traceback (most recent call last):

  File "apps/frappe/frappe/", line 69, in application

    response = frappe.api.handle()

  File "apps/frappe/frappe/", line 54, in handle

    return frappe.handler.handle()

  File "apps/frappe/frappe/", line 45, in handle

    data = execute_cmd(cmd)

  File "apps/frappe/frappe/", line 83, in execute_cmd

    return, **frappe.form_dict)

  File "apps/frappe/frappe/", line 1581, in call

    return fn(*args, **newargs)

  File "apps/frappe/frappe/desk/form/", line 38, in getdoc


  File "apps/frappe/frappe/desk/form/", line 369, in run_onload

    doc.set("__onload", frappe._dict())

  File "apps/frappe/frappe/model/", line 203, in set

    if not as_value and key in self._table_fieldnames:

AttributeError: 'CustomerSubEntry' object has no attribute '_table_fieldnames'

is there any way to fix this?

thank you soo much in advance

1 Like