By mistake, I deleted the directory of the doctype (child doctype), but still I can see it in the frontend (the erpnext application through the browser) and the table is existed in the database.
How I can re-create the module (with the python, js and json) files under the doctype directory?
bench migrate is to update the fields based on json file.
But in my case, I need to create the module directory and the python, js and the json files from the frontend.
Anyway, I tried bench migrate and did not create any files in the backend.
OK the problem resolved by remove the selection for custom check box in the doctype.
Make sure this is not being saved in any of erpnext’s module
Here is a less time consuming and actually working (the python scripts wont be restored) as long as you didn’t modify anything else:
cd to the directory of frappe installation. Run
cd ./apps/erpnext/erpnext and then run
git reset --hard.