Tuesday, June 26, 2012

An OpenERP Apps and dependencies installer

While the apps.openerp.com site provides access to community modules, there is  no way to automatically download a module and all it's dependencies. The problem is even worse if the dependency modules are hosted in different branches.

For this, I created a tool to assist in downloading a module and all it's dependencies, in a way similar to Python's pip or Ubuntu's apt-get.

Here is a quick-start demo:

First, position your command line on your target "addons" directory. For demonstration purposes, let's use a temporary location:

mkdir /tmp/addons
cd /tmp/addons

Now install the "apps" tool and specify the OpenERP version you are working with:

bzr checkout --lightweight lp:~dreis-pt/+junk/apps
apps/init 6.1

Finally, use "apps/get" to download the modules you need. The tool will search in an index for their branch location, download and copy to the current addons directory. Let's try it with two different asterik related modules:

apps/get asterisk_click2dial asterisk360

The apps/get command depends on pre-genererated index files. The program to generate these indexes is also provided, but that's a long running operation, ment to be regularly executed by a server.

I know there are a lot of things to improve, but the current version is perfectly usable. I feel this could be an important tool for the community, so comments would be very welcome.

No comments:

Post a Comment