I have a custom app, i am in developer mode, and i created a custom doctype. If I leave the Custom?
checkbox unchecked the system will automatically create the json, py and js files in the correct directory under my custom app. But if i leave it unchecked when accessing the Doctype I am prompted with an ImportError.
Example of error:
Traceback (innermost last):
File "/home/strella/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
response = frappe.handler.handle()
File "/home/strella/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
execute_cmd(cmd)
File "/home/strella/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/strella/frappe-bench/apps/frappe/frappe/__init__.py", line 806, in call
return fn(*args, **newargs)
File "/home/strella/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 12, in savedocs
doc = frappe.get_doc(json.loads(frappe.form_dict.doc))
File "/home/strella/frappe-bench/apps/frappe/frappe/__init__.py", line 534, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/document.py", line 46, in get_doc
return controller(arg1, arg2)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/document.py", line 82, in __init__
super(Document, self).__init__(arg1)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 48, in __init__
self.update(d)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 71, in update
self.set(key, value)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 118, in set
self.extend(key, value)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 144, in extend
self.append(key, v)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 132, in append
value = self._init_child(value, key)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 159, in _init_child
value = get_controller(value["doctype"])(value)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/base_document.py", line 39, in get_controller
raise ImportError, doctype
ImportError: Issue Assigned To
However, if i proceed to check the Custom?
checkbox, i can load the doctype successfully.
My question is, what is the correct procedure for creating custom doctypes and ensuring that the json, py and js files are updated as we are designing the form etc.? Should we or should we not check the Custom?
checkbox?