diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 484f12811c..62884aed81 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -343,7 +343,8 @@ class DocType(Document): if merge: frappe.throw(_("DocType can not be merged")) - if not frappe.flags.in_test and not frappe.flags.in_patch: + # Do not rename and move files and folders for custom doctype + if not self.custom and not frappe.flags.in_test and not frappe.flags.in_patch: self.rename_files_and_folders(old, new) def after_rename(self, old, new, merge=False):