OpenERP with GIT

What is OpenERP?

A  powerful, flexible python based OpenSource ERP system.

What is GIT ?

A distributed SCM written by Linus Torvalds . You can read more on this,
http://git-scm.com/

Why OpenERP’s Project Management?

OpenERP’s project management has a very nice set of features like tasks, task delegation,multi level nesting of projects,  linked to tasks, analytic account linked to project which augments you to clearly track the project and costs involved  and so on.

You can read more about OpenERP’s project management at,

http://doc.openerp.com/book/4/4_13_Projects/4_13_Projects_management.html

Why is the OpenERP – GIT integration?

Only thing missing, which I noticed was its SCM (Source Code Management) integration, which could be useful for software firms. Then I took it as my Sunday project aiming for 5.X version of OpenERP and here i am with it.

Basic Features of the module:It allows you to do,

  • Associate one or more git repositories to a Project
  • Tasks can be updated based on the commit message used.
  • Task work time can also be updated from the commit message, so that users do not have to login to the system.
  • From task, you can see all the associated revisions made by the members.
  • From the Project, you can see all the revisions made by the project members.

Detailed guide:

Installation:

Install the module project_git which requires python-dulwich module.

You can install it as, apt-get install python-dulwich, in debian based system.

Configuration:

When you install the module a cron will be set-up which by default run for every 5 minutes.

You can change this timing by searching for the name “Git Repo” under

Administration -> Configuration -> Scheduler -> scheduled actions.

Now,

Go to your project and switch to the Git Repositories tab.

Here you can add multiple local repositories.

For eg: /srv/test_repo

Git Repository

Sample Git Repo

and you can use “Test Repo” button in the form, to test if the git directory really exists.

Thats it, we are ready to go !

Reactions:

Once you install this module it will add an auto increment number to the Project task.

This needs to be used for referring tasks from git commit messages.

A new action “All Revisions” will be added to Tasks and Projects.

Commit messages:

It supports three attributes as of now,

1) #refs
2) #time
3) #user

For eg:
a) git commit -m “Initial commit #refs T0001”:

It will update your task identified by the number T0001 with this revision.

b) git commit -m “Initial commit #refs T0001 #time 3 #user selvam”:

It will update your task identified by the number T0001 with this revision and also update the Task Work field of the particular task with 3 hours of work done by the user selvam, which is the login name for the user.

c) git commit -m “Initial commit #refs T0001,T0002,T0003 #time 3,5,6 #user selvam”:

Similar to the last one except that this update the three tasks with respective timings.

Warning: If the you are giving 3 task references and 2 timings, then time updating will not happen.

Miscellaneous:

1) Commit message #user, must be associated with an employee.

2) Project needs to be associated with an Analytic account.

Viewing Revisions:

In each task, there will be a Revision tab which will list all the revisions with respect to that task.
If you want to view them in new window, choose “All Revisions” from the actions.
From a Project choose “All Revisions” from the actions, for viewing all the revision with respect to the project.

Revisions

Revisions

Task Update:

Commit will update the task work, with the commit message and user referred in the commit message.

Task and Time spent

Task and Time spent

You can also see the related revisions in task,

Task Revision

Task Revision

Where to Download ?

If you have a launchpad account, from  your addons directory you can do,

bzr branch lp:~e-ndicusteam/openerpgit/project_git

Roadmap:

  • Timing problem with git.
  • Regex needs to be removed from git message
  • Wrong commit needs to marked as exception.
  • Time based update need to be based on a switch, that can be disabled.
  • Branch based revisions, so that you can filter based on Branches in a particular repository.
  • Tree structure navigation for git repositories.
  • Integration with Project issue.
Advertisements

6 Comments (+add yours?)

  1. ஆமாச்சு
    Nov 24, 2010 @ 17:50:00

    வாழ்த்துக்கள். தொடருங்க. Keep going.. Was so exiting but disappointed to note that the code will be released after a break 😉

    Reply

  2. Paulius
    Nov 29, 2010 @ 21:01:45

    Cool! I love git and I work with the OpenERP. Greet job man.

    Reply

  3. Anny
    Dec 19, 2010 @ 18:11:59

    nice work keep it up.

    Reply

  4. Dairon Medina
    Apr 28, 2011 @ 00:12:27

    Nice, please tell me if Mercurial integration exists? Im interested on hg integration plugin development if it doesn`t exist.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: