Developer documentation

From Dolibarr Open Source ERP CRM Wiki

This page is main index of documents relating to developer documentation. For user documentation, see here.


Development organization and tools

This chapter contains global information that must be read before to start any development on Dolibarr.

  1. Organization of project
  2. To known before to start to develop
  3. Environment and development tools
  4. Dependencies and external libraries
  5. Get or update sources of a development version

Coding rules and best practices

  1. Prerequisites
  2. Language and development rules (PHP, SQL, HTML)
  3. List of tables
  4. Tree structure of files and classes are available onto doxygen generated documentation

List of modules

Technical documentations on standard business modules are available on developer documentation of each modules. Choose page you are interested in to go on it:

To develop a new module/addon for GUI

This section describe how to develop a new module on Dolibarr that change how Dolibarr works. Such modules can have its own screens, its own data, its own CSS stylesheet, its own business code or all of this. Script development is not included in this section (this is described in next chapter).

To develop your own module, go on tutorial: Module development

To develop a batch or command line script

This chapter describe the way to develop its own command line script to realize Dolibarr treatments (read, update data...). Making modifications on user Gui interface (GUI) is not included in this chapter. See previous chapter for this.

To develop a script, like a cron script or an command line import tool to import data from an external source, you can have a look at the page: Script development

Technical components of Dolibarr

Tree structure

Path hierarchy of current version are defined into doxygen generated documentation (generated "javadoc" like documentation).

However, paths to use to add new files by a new module is defined in the documentation to develop a new module (see Module development).

Setup storage

There are 3 places for Dolibarr setup parameters.

  • Dolibarr technical setup (authentication mode, database logins and storage area for files) are defined in only one setup file conf/conf.php. See Configuration file for more information.
  • Global features parameters are stored in Table llx_const. See page Constants for more information.
  • Feature parameters for particular users are stored in Table llx_user_param. See page Constants for more information.

Business objects

See page Business Objects

Menus system

See page Menus system

Tabs system

See page Tabs system

Skins system

See page Skins

Box system

See page Box system

Authentication system

See page Authentication

Permission system

See page Permissions

Translation system

See page Translation system

Error management

See page Error reporting

Canvas system

Canvas is a developer feature to replace sreens to create, update or view a card (products, thirdparties, contacts, ...). For example, you can replace the input form to create a new third party, or to edit it, or replace the card used to view it.

See page Canvas development

Triggers system

Triggers is a develop feature to execute personalized code during a Dolibarr "Business event" (creation of invoice, delete of user, update of thirdparty, etc...), and only for a business event. To personalize code for other contexts, see instead chapter Hooks system.

For triggers usage, see this page.

Hooks system

See page Hooks system.

Variable substitution system

See page Variable substitution system.

Web services

Dolibarr can be setup to provide some services. See Module Web Services

Files/Documents storage management

See page Generated documents

Numbering modules

For each entity created in the application, Dolibarr assigns a reference. In order to adapt the reference to any use, Dolibarr use modules to define the rule of generation of this reference. Several modules are supplied with application. Some are generic and are used to define the mask numbering (number on x characters, with or without prefix, including the date or not, etc.), which can meet most needs. However, there are still cases where the modules provided does not meet the need. In this case it is necessary to develop its own numbering module.

For more information, see on page Create numeration module

Document templates and generating documents

More documentation about document generation from models is available on page Create a PDF document template or Create an ODT document template


See page Extrafields

Other internal function

There is a lot of internal libraries your code can use. You may find a lot of generic functions into files functions.lib.php or functions2.lib.php or admin.lib.php. But any function found into htdocs/core/lib/*.lib files can be used.

To make a condition on Dolibarr version

For example, to make a condition on Dolibarr > 3.5, you can use versioncompare and versiondolibarrarray found into admin.lib.php

if (versioncompare(versiondolibarrarray(), array(3,5,0)) > 0)

Mass exports/imports

  1. Mass imports
  2. Mass exports

Interfaces and links with other applications

  1. Interfaces Dolibarr toward foreign systems or toward Dolibarr (Dolibarr Triggers)
  2. Interfaces from foreign systems toward Dolibarr
  3. Web Services


All FAQ are available through index page FAQ EN

Personal tools
  • Ask to to request an account to contribute to this documentation
  • Log in
In other languages
No translation in Italian.
No translation in Greek.
No translation in &lt;multilanguagemanager_cn&gt;.

Social networks
Follow us on Google+ Follow us on Facebook Follow us on LinkedIn Follow us on Twitter