Most Powerful Open Source ERP

Learning Track: How to create a forum module

This document provides a learning track for experienced developers -> FLAG for archive, replaced by https://nexedi.erp5.net/web_page_module/4991
  • Last Update:2020-12-03
  • Version:005
  • Language:en

This learning track is designed for programmers who want to understand ERP5 in deep. It usually takes 4 days for fast developers, 10 days in average and up to 3 weeks for the very beginners. The learning track teaches:

  1. How to install ERP5
  2. How to use ERP5,
  3. How to develop with Python language
  4. How to develop with Zope
  5. How Zope core is designed
  6. How to develop a simple application with ERP5
  7. Where to find ERP5 development guidelines
  8. Which mailing lists to subscribe to

Step 0: Install ERP5

There are multiple ways to install ERP5. They are all described on the web page How to Install ERP5.

For learning purpose, it is strongly recommended to use Linux  package. Please follow the Help instructions. The Linux  package  provides a simple way to install ERP5 on your laptop, on a PC or on a server. With Linux  package , you get a pre-configured ERP5 instance to learn how to use ERP5 and to learn how to develop with ERP5. RPMs or Deb packages are available for most GNU/Linux distributions. There is also a Virtual Machine image for those who do not use GNU/Linux as their main platform.

Once you have a working ERP5 instance, you can go to the next step.

Step 1: Learn how to Use ERP5 as a Standard User

The second step, and one which is very important, is to learn how to use ERP5, and what is ERP5 about. The more you understand how end users interact and use ERP5, the more you will be able to provide them with great developments and customisations of the software.

We recommend you to follow the 18 user tutorials which are available on the page Learn how to use ERP5. This should take you few hours to complete, but once again it is an important step.

Once you know how to use ERP5, you can go ahead with the next step and develop your first application.

Note: ERP5 Tutorials are being regularly updated and improved as part of a partnership programme with universities called One Student One ERP (OSOE). Under this programme,  students can get  a free ERP5 SaaS instance from OSOE. Professors can customise ERP5 to fit their educational goals. If you are willing to contribute to improve ERP5 education, please contact OSOE and introduce  OSOE to your university.

Step 2: Learn Python

Read "Dive Into Python" to learn python. Python is easy to learn. It was designed to teach programming to children. Python also provides advanced reflexive programming approaches which do not exist, for example, in Java. Such reflexive programming techniques are used intensively in ERP5 and are one of the reasons why ERP5 code base can be kept small.

Once you learn python, read "ERP5 Python Introduction" and make sure that there is nothing new for you.

Tutorial: ERP5 Python Introduction (Read - Download)

This tutorial is an introduction to Python. It presents the basics of this programming language. It must be well understood to be able to develop ERP5 applications on your own.

Step 3: Learn Zope

Zope is the application server and object database which ERP5 is based on. Read the Zope Book, a comprehensive documentation about Zope. If you lack time, here is a list of the most important chapters to read:

Chapters about Zope service and DTML are less useful for ERP5. You may skip them. On the other hand, page templates are really important to understand.

Once you learned Zope, read Page Template Introduction and make sure there is nothing new for you.

Tutorial:  ERP5 Page Template Introduction (Read - Download)

This tutorial is an introduction to Page Templates in Zope. It must be well understood to be able to develop ERP5 applications on your own.

Step 4: Learn Zope Core

The next step is to read the Zope Developer's Guide (https://zope.readthedocs.io/en/latest/zdgbook/index.html). This documentation is a bit tough to read. However, it provides one of the best views about the internals of Zope. Read it once for now, even if you do not understand it completely. You will need it sooner or later if you need to debug some difficult issue.

Step 5: develop your first application with ERP5

Now that you are familiar with ERP5, you can start the forum tutorial. This tutorial is made of 7 presentations which each teach a specific aspect of ERP5.

Tutorial 1: How To Create A New Module (Read - Download)

This tutorial explains how to create a new module into ERP5. In our example we will create a forum module (Discussion Threads) and its objects.


Tutorial 2: How to create a new portal type (Read - Download)

This tutorial explains how to create a new type of content into ERP5. In our example we will create the discussion post type.


Tutorial 3: How to create a new workflow (Read - Download)

This tutorial explains how to design and implement workflows into ERP5. We will design the workflow we should associate with a Discussion Post and a Discussion Thread.


Tutorial 4: How to create a view (Read - Download)

This tutorial explains some of the rendering features of ERP5. The purpose here is to display a list of all Discussion Threads then below each Discussion Thread, all Discussion Posts from which is made the specific Discussion Thread.


Tutorial 5: How to create security rules (Read - Download)

This tutorial explains how to create security rules into ERP5. This is important in ERP systems since you might not want everyone to be able to perform all actions into the system. In our example we will define three roles, the administrator of the forum, the user and the visitors.


Tutorial 6: How to create a Business Template (Read - Download)

This tutorial explains how to create a business template with all your code. Business Templates (bt5) are the packaging system of ERP5 and let you easily move and install features from one ERP5 installation to another. In our case we will create the "erp5_discussion" business template.


Tutorial 7: Create unit tests (Read - Download)

This tutorial explains how to create unit tests and by so how to make sure your business template will keep working from one upgrade to another. If you don't test your business template, it will sooner or later stop working and maybe even without you noticing when it happens.


Once you have finished all tutorials, you should already be able to use ERP5 as a development platform. It is now time to increase your knowledge by reading guidelines and tracking ERP5 development on mailing lists.

Step 6: Read Guidelines

ERP5 is developed by people located on all continents in the world. In order to keep consistency across such as distributed team, guidelines have been written. Make sure you know them and that you enforce them all. This will save a lot of time to developers during the peer-review of your code. Guidelines can be found on the community wiki:

Step 7: Subscribe to Mailing Lists

Subscribe to ERP5 Report mailing list. It is the most important mailing list. It keeps you informed about the latest developments related to ERP5 through automatically generated reports. Currently, this list is used to post svn activities and the results of automatic unit testing.

Important announcements related to changes in the core of ERP5 are made on the ERP5 Developers mailing list.

Other ERP5 mailing lists related to ERP5 can be found here.