How to install business templates
What's 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 .
Select Update Repositories Informations. Enter
in the repositories field.
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 ... and wait.
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, click on the 'Import/Export' button .
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:/// ). 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
- 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).