Move Core Doctype to Custom App?

ERPNext Version 13

For core doctypes, what would happen if I change the Module to one of my custom apps and install it to another instance?

So far I found that the core doctype still exists in frappe-bench/apps/erpnext, and a new doctype was also created under my custom app directory.

Will there be any further conflicts down the road?

I have made some edits in core doctypes (not customize form, I know, thus cannot use property setter&fixtures), changing module seems like the only way to move the changes to another instance.

If there’s any other way to achieve this, I’d really appreciate. There’re too many edits to simply resume back to customize form and export customization.

Thanks in advance!

Editing the core doctype gets messy and will require you to maintain a separate fork of the code. The intended way to do this would be with a doctype class override hook:
https://frappeframework.com/docs/v14/user/en/python-api/hooks#override-doctype-class

1 Like

Thank you so much! I totally overlooked the hooks. However, it seems to only override the .py and .js file. Is there a way to override the .json file for the core DocType in app? I am not planning to update my current instance.