Changing a doctype's module

In order for me to understand the architecture and systematics of ERPNext I make some customization.

When I edit/customize a doctype and change the Module from one module to another, in the new module there is a new folder created with the name of the doctype (with some files in it). But the doctype’s py file is still empty.
And in the old module, the doctype’s folder is still exist (with all the standard files).

  1. Is this new doctype a symlink? Because when click on the menu page, it opens the same (standard) doctype.
  2. If I want to make customization, should I do it in the new or standard doctype?
  3. If I wan to create a new module for the sidebar menu, is this the correct way to do?
  4. Should I also move (and merge) the standard doctype folder to the new module?

Thank you.

1 Like

what i learn so far for creating a module…

  1. better to create a new apps for new module. why? when you create a new module for apps that already there thats mean you are modifying the apps. when there is a new version for thats app you will have trouble when updating
  2. creating a 2nd module for the apps that you create will need to execute bench migrate and update desktop.py for it to show on the system.
  3. if the current module only have a couple thing that you want its better to create a new doctype than modifying
1 Like

@anditsung

Thanks for your input.

My consideration is that I use the multi tenant erpnext. Supposedly, the new apps will not be installed when a new site is created.

How do I automatically install them to new sites created?
The new sites will not be created by an admin but by users.

Thanks.

creating a script for new site then install the apps for that site?
since creating a new site must be on terminal it should be easy to create such script

Back to this question.
This happen even when I’m not creating new module/app. I only change the module owner of a doctype in the dictype customization, for example change doctype Item from Stock module to Asset module.
In the Asset module will occur a new folder called Item with some basic files. But in the Stock, the original Item folder still exist.
Is the new Item in the Asset a symlink?
If I want to make custom doctype or report or other, should I put it in the Stock’s Item or Asset’s Item?

I am also struggling with the same problem
Can anyone help?