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.


Contents

Development organization and tools

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

  1. Organization of project
  2. To be known before starting 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 in the doxygen generated documentation

List of modules

Technical documentation on standard business modules is available in each module's developer documentation pages. Choose the appropriate page you are interested in:

To develop a new module/addon for GUI

This section describes how to develop a new module changing the Dolibarr user interface. This can be screens, themes, data, its own CSS stylesheet, source code or all of this.

Script development is not included in this section (this is described in the next chapter).

To develop your own module, check the Module development tutorial.

To develop a batch or command line script

This chapter describes how to develop command line scripts to execute tasks in Dolibarr (read, update data...). Making modifications to the graphical user interface (GUI) is not included in this chapter. See the previous chapter for this.

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

Technical components of Dolibarr

Tree structure

The path hierarchy of the current version files is available from the doxygen generated documentation (similar to generated "javadoc" documentation).

Paths to use to add new files by a new module are 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 parameters (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 the Constants page for more information.
  • Feature parameters specific to a user are stored in Table llx_user_param. See the Constants page for more information.

Business objects

See page Business Objects

Menus system

See Menus system.

Tabs system

See Tabs system.

Skins system

See Skins.

Box system

See Box system.

Authentication system

See Authentication.

Permission system

See Permissions.

Translation system

See Translation system.

Error management

See Error reporting.

Canvas system

Canvas is a developer feature to replace screens to create, update or view a record (products, thirdparties, contacts, ...). For example, you can replace the input form used to create a new third party, or its editing form, or replace its viewing template.

See Canvas development.

Triggers system

Triggers are a development feature to execute personalized code during a Dolibarr "business event" (creation of an invoice, deleting a user, update of third party, etc...), and only for a business event. To personalize code for other contexts, see the Hooks system chapter instead.

For triggers usage, see this page.

Hooks system

See Hooks system.

Variable substitution system

See Variable substitution system.

Web services

Dolibarr can be setup to provide some services.

See Module Web Services.

Files/Documents storage management

See 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 reference generation rule. Several standard modules are supplied. Some are generic and are used to define the numbering mask (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 don't meet the needs. In this case it is necessary to develop a custom numbering module.

For more information, see Create numbering module.

Document templates and documents generation

More documentation about document generation from templates is available to Create a PDF document template or Create an ODT document template.

Extrafields

See Extrafields.

Other internal function

There are many internal libraries your code can use. You may find a lot of generic functions in the functions.lib.php, functions2.lib.php or admin.lib.php. Any function found in htdocs/core/lib/*.lib files can be used.

To specify a requirement based on Dolibarr version number

For example, to make a condition based on requiring Dolibarr version > 3.5, you can use versioncompare and versiondolibarrarray found in 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

FAQ

All FAQs are available through the FAQ index page FAQ EN

Personal tools
  • Ask to contact@dolibarr.org to request an account to contribute to this documentation
  • Log in
In other languages
FrenchSpanishDeutschItalian
No translation in Italian.
Greek
No translation in Greek.
<multilanguagemanager_cn>

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