Most Powerful Open Source ERP

How To Use Commit From ERP5

Document showing how to work with business templates using git from inside ERP5.
  • Last Update:2017-03-27
  • Version:001
  • Language:en

This document should show a user how to setup the ERP5Forge business template to be able to use git inside ERP5.

Please note that this document doesn't concern Products (or ERP5 Core) development.

Table of Contents

Installing ERP5Forge

Start by installing the ERP5Forge business template (bt5). See How To Install Business Templates in case you don't know how to work with business templates.

ERP5 | Open Source ERP - Installing erp5_forge business template

To be able to connect from within ERP5 to the repository you'll first need to update your preferences. Navigate to your preferences:

My Favorites > Preferences

 

and locate the VCS tab which has been added when installing ERP5Forge.

ERP5 | Open Source ERP - Preferences VCS tab

Setting Your Working Copies

The Working Copies Preference needs to contain the location of the working copies of your "git" repositories and is required to use git from within ERP5. To set this up go to the webrunner interface of the runner your current ERP5 instance is installed on.

SlapOS Webrunner | Main Interface

Open a terminal. You should be in the "working" directory of your webrunner, containing the instance, software, and project directories. If you run

ls

You should see something like :

SlapOS Webrunner | Terminal - Software Releases

Find The Zope's Slappart

You now need to find the correct slappart containing the zope instance. To do so, try entering:

ls instance/slappart*/etc/run

Your zope instance is in the slappart which contains a zope-0 binary in its etc/run folder.

Alternatively you can pick any service PID running on the services tab and grep it using ps -edf | grep 30426. The result should also point you to the correct software release.

Clone ERP5's Repository

Navigate to your instance erp5shared folder using:

cd instance/slappartX/srv/erp5shared/ # slappartX being the slappart found previously

Clone ERP5's repository here, and eventually your project's custom repository :

git clone https://lab.nexedi.com/nexedi/erp5.git

You will have a fresh erp5 repository containing 2 sub-directories where BT5s can be found : erp5/bt5, and erp5/product/ERP5/bootstrap. You can retrieve their exact paths by cd into them and then running pwd.

Tell ERP5 About The Path To Bt5s

The final step is to add these BT5 paths to the working copies field inside ERP5. Include your email address and save.

ERP5 | Open Source ERP - Screenshot Preferences VCS Working Copies

Commit Your Bt5

If this is a newly created BT5, don't forget to create a working copy. See How To Commit New Business Template

If you now navigate back to business templates and clone an existing template you should have the Git tab available to commit the changes you have made.

ERP5 | Open Source ERP - Screenshot Business Template Forge Git Tab

Working with the ERP5Forge Bt5

Please refer to How To Use ERP5 Subversion for learning how to work with this buinesss template and commit your code to a repository.

Troubleshooting

If the Git tab does not show up, you can check any of the following:

Check That The Bt5 ERP5Forge is installed

Check the beginning of this tutorial 

Ensure Preference is activated

Make sure your preferences are active. For this, check the Active property of your preferences :

ERP5 | Open Source ERP - Screenshot Preferences Active Preference

Related Articles