← Back to team overview

openerp-community team mailing list archive

Re: Merge several modules to one

 

Hello Denis,

before all, I strongly recommend against merging several modules into a
single module!

Why do I think this is extremely bad:

By merging modules you'll destroy the information about the
responsibilities of each part of the customization.
That is you will create a nightmare for future migration.

Indeed, when customizations are modular instead, when you migrate to a new
version, it will be way easier to migrate the code of modules one by one
according to the dependency order.
You also give you a better chance that as the years are passing, may be
some OCA or other quality module would fulfill some of your customization
requirements so that you can keep the volume of customization under control
and swap some custom module by some community maintained module.

You know, in several years, the worst case of OpenERP installations I have
ever seen were all these installation with a single module of 5000 lines or
more. Everytime I have been confronted to such situation it ended with a
"sorry, we won't be able to rescue your project, see with somebody else"
and most of the time the fool guy ended up abandoning OpenERP because no
fireman would ever take the risk to maintain a monolithic codebase.

Now if you should really move modules around, well you should be ready for
SQL fighting. The tools of Openupgrade can also help you. But make no
mistake this is all quite involved.

The fact that unstalling a module kills the module datastructure is
something that has been introduced in v7. Eventually you can hack in the
code to avoid that as it was in previous versions. I'm not convinced this
change was an improvement.

Good luck though.

-- 
Raphaël Valyi
Founder and consultant
http://twitter.com/rvalyi <http://twitter.com/#!/rvalyi>
+55 21 3942-2434
www.akretion.com




On Fri, Jul 4, 2014 at 4:29 PM, Denis Karataev <dskarataev@xxxxxxxxx> wrote:

> Hello community!
>
> We'd like to merge all modules that we developed inside same project to
> one module. So we should have 1 module = 1 project. Now it's about 25
> modules and we'd like to move code from all them to one folder, one module.
>
> But I don't understand how to do it? When I uninstall old modules it
> removes data from database. But how can I install new module without
> uninstalling old? It duplicates old modules.
>
> What is your recommendation?
>
> Thanks!
>
> --
> Denis Karataev.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References