Most Powerful Open Source ERP

How To Install Business Templates

How To guiding through the process of adding functional components to an ERP5 instance.
  • Last Update:2019-10-23
  • Version:001
  • Language:en

ERP5 is based on a very generic core library which implements the Universal Business Model (UBM). This core is then specialized through business templates  to provide applications in each business field of an ERP5: accounting, trade, CRM, document management, etc.

Table of Contents

Available Business Templates

The list of available business templates can be found in the developers documentation with there related documentation. The business templates are also listed on the public SVN repository.

What is contained in a business template

Business template is a collection of ERP5/Zope objects (ZPT templates, Formulator forms, portal types, Python scripts etc) serialized into a human-readable format. By installing a business template you make your ERP5 recreate these object in your ZODB. Usually, a business template (which we'll call a bt5) forms a complete application or a working part of an application.

bt5's are a very convenient way to exchange and distribute applications or certain functional 'modules' build within the ERP5 framework.

Install Business Template from Repositories

  • Select "Manage Business Templates" from the My favourites menu.
  • Select the Import/Export Menu ERP5 UI Icon | Import-Export
  • Select Install Business Template from Repositories from the Import/Export menu.
  • Select business templates you want to install using checkboxes.
  • Then click on the Install Business Templates from Repositories button.

Manual installation process

This works best if you'd like to use the latest version available - which is in most cases the recommended solution. Most business templates are rather stable, but the latest version may contain bugfixes not yet included in builds.

So, check the business template out from svn:

svn checkout https://svn.erp5.org/repos/public/erp5/trunk/bt5/erp5_[what you like]

For core templates (erp5_core, erp5_xhtml_style and erp5_mysql_innodb_catalog), it is a bit different, because they are located in bootstrap directory, and you don't have to install them - they are already installed. However, if you want to update them, or to have a local working copy for use with ERP5 Subversion, do like this:

svn checkout https://svn.erp5.org/repos/public/erp5/trunk/products/ERP5/bootstrap/erp5_core

Alternatively, download a business template and unpack it into a working directory. The directory can be on your erp5 server or on the station you are using ZMI from.

  • Select "Manage Business Templates" from the My favourites menu.
  • Select the Import/Export Menu ERP5 UI Icon | Import-Export
  • In the dialog, select Import Business Template if you will be uploading the template from your station, or Download Business Template From URL if it is on your server or in a remote repository.
  • The directory you will be installing your bt5 from is the root directory of the template - select it or enter it's url (if it is on your server, the url starts with file:/// ERP5 UI Icon | Save ). Click on the action button (Import Business Template or Download Business Template From URL), you will be redirected to the newly downloaded business template.
  • From "Action" box select Install business template. You will be shown a complete list of objects the template brings, together with information what erp5 is going to to with them. Go ahead. This stage can take a while, especially if you are not using CMF Activity, so be patient. After that, you're done.

Updating from SVN

If you want to stay on the bleeding edge (which is recommended given the pace of development of ERP5), the best way would be to regularly update your bt5s from svn:

  • Install erp5_forge business template.
  • Check out the bt5s from svn repository (see above).
  • Go to your Preferences, select default_site_preference, Subversion
  • Enter filesystem path to the place where you checked out the bt5s (it has to be within INSTANCE_HOME).
  • Make sure your preference is enabled.

Now, go back to your template and from Action dropdown select "Update business template from svn". You will be shown a list of object that have been changed since your last update, with preselected options like "install", "backup and upgrade" or "backup and remove". If you are just updating, you can trust the preselection and just confirm. Done.

If you do a site-wide update, the safest way is to do it in the same sequence as the installation, according to dependencies - start with core templates, then update every generic bt5 before the ones that depend on it.

Dependencies And Sequence

Some templates depend on other templates, so take a look at the "Dependencies" box before running "Install" action. If during installation process you get AttributeError exceptions, chances are you haven't installed something that is required.

Also, even if another template is not explicitly required (or conflicting), remember that it does matter in what sequence you install templates. If a template contains a portal_skins folder, the skin is added at the top of portal_skins precedence list (just below 'custom' skin). This can make some objects overwrite (or overshadow) other objects in different orders depending on how you proceeded with installation.

However, normally you don't need to worry about it, since most bt5 which require other bt5 has an appropriate entry in "Dependencies" field and installation will fail if you don't have all dependencies installed.

Specific issue on form upgrade

When upgrading forms it can happen that some field are moved into a specific group named 'not assigned'. Widgets with go in this form are one which were present onto the former form but in a specific group with is no longer present after the form upgrade. For example, widget was in group 'bottom' and new form doesn't contain the group any longer but you choose to keep the widget at bt upgrade, so in order not to loose the view of these widget in order view, they are put in a specific group. So you just have to put these field back in appropriate group and remove the group 'not assigned' when empty (Notice that 'not assigned' group is never display in xhtml style).

How to install Business Templates from within ERP5

The best way to install business templates is to connect to ERP5 as Manager and invoke the menu 'My favourites' >> 'Manage Business Templates'. This brings you to a page which displays installed business templates.

Then click on the 'Import / Export' button. You will be redirected to a dialog which by default is use to set a repository of business templates:

Define the source of business templates. If you plan to develop applications, use the latest snapshot: http://www.erp5.org/dists/snapshot/bt5. If you wish to use a tagged business template, you can browse the repository to find the propoer URL. It could be for instance http://www.erp5.org/dists/release/5.4.6/bt5/

Once the source is set, click again on the "Import / Export" button and invoke the dialog 'Install Business Templates from repositories'. This shows a list of installable business templates:

Select the business templates you plan to install thanks to the checkbox and click on 'Install Business Template from Repositories' button. A page which lists all components to be installed is displayed:

You can check the data, then click on 'Install Business Templates' to validate.

You can read more informations about business templates on the old developer wiki page about ERP5 business templates.

Related Articles