Customizing Dolibarr: Modifying the Interface and Adapting Menus
   03/04/2025 00:00:00     Dolibarr    0 Comments
Customizing Dolibarr: Modifying the Interface and Adapting Menus

Dolibarr is an open-source ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) solution, widely used by businesses due to its modularity and ease of use. However, to maximize its efficiency and tailor it to specific company needs, it is often necessary to customize the interface and adapt the menus.

In this article, we will explore different ways to modify Dolibarr’s interface, customize its appearance, and reorganize the menus for better usability and an optimized user experience.


1. Why Customize Dolibarr’s Interface?

While Dolibarr provides an intuitive interface, each business has unique needs that may require adjustments. Customizing the interface offers several benefits:

  • Improved productivity: By displaying only the relevant modules and features.
  • Smoother navigation: By simplifying access to essential menus.
  • Consistent branding: By adapting colors and logos to match the company’s identity.
  • Role-based customization: By restricting access to certain functionalities depending on user roles.

2. Modifying Dolibarr’s Appearance

Choosing a Custom Theme

Dolibarr offers several pre-installed themes that allow users to customize the interface’s look and feel.

To change the theme:

  1. Go to Configuration → Display.
  2. Select a theme from the dropdown list.
  3. Save changes and refresh the page to apply the new style.

If the default themes do not meet your needs, you can install a custom theme from the Dolistore or create your own by modifying the CSS files.

Changing the Logo and Colors

To align Dolibarr with your company’s branding, you can add a custom logo and modify the colors.

Steps to change the logo:

  1. Go to Configuration → Company/Organization.
  2. Upload your logo in PNG or JPEG format.
  3. Save and refresh the page.

Modifying colors via CSS:
For advanced customization, you can edit the CSS file of the active theme:

  • Navigate to the htdocs/theme/ folder.
  • Edit the style.css file to adjust button colors, menu backgrounds, and fonts.
  • Save changes and clear your browser cache to apply the modifications.

3. Reorganizing and Customizing Menus

Dolibarr allows users to customize menus to simplify navigation and improve efficiency.

Activating and Deactivating Modules

Menus in Dolibarr are generated based on the activated modules. Disabling unused modules can declutter the interface.

To manage modules:

  1. Navigate to Configuration → Modules/Applications.
  2. Activate or deactivate modules based on your business needs.
  3. Ensure that the displayed menus match your required functionalities.

Reordering Menu Items

If you need to reorganize menus, you can modify their order or hide specific sections.

Method via the admin panel:

  1. Go to Home → Menus.
  2. Select the menu you want to modify (e.g., "Main menu").
  3. Rearrange items by changing their position or removing unnecessary ones.

Method via the menus.inc.php file:
For advanced customization, you can edit the menus.inc.php file, located in the module’s folder (htdocs/core/menus/). You can:

  • Change menu item order by adjusting priority levels.
  • Add custom entries to include links to external pages or custom tools.

4. Adding Custom Shortcuts and Quick Links

To improve efficiency, you can add shortcuts to frequently used functionalities.

Creating Shortcuts on the Dashboard

Dolibarr allows users to add custom widgets to the home screen.

  1. Go to Home → Dashboard Configuration.
  2. Add widgets related to frequently used functionalities (recent invoices, pending tasks, etc.).
  3. Save and arrange elements according to your preferences.

Adding a Custom Menu Item

If you need to add a link to an external tool or a specific page:

  1. Open the menus.inc.php file in the relevant module folder.
  2. Add a new menu entry, for example:
    php
    $newmenu->add("/custompage.php", "custom", "My Link", 0, "mymodule");
  3. Save and reload Dolibarr to apply the change.

5. Customizing Menu Icons and Styles

Changing Menu Icons

Each menu item can have a specific icon for better identification. To modify icons:

  1. Go to the htdocs/theme/common folder.
  2. Replace the existing icon with a new one in PNG or SVG format.
  3. Refresh your browser cache to see the changes.

Customizing Menu Styles

If you want to modify menu appearance, you can:

  • Edit the CSS file associated with the menus (style.css in the active theme).
  • Change menu item colors using specific CSS classes.

Example:

css
.tmenu { background-color: #004080; color: white; }

6. Adapting Dolibarr to Specific Needs with Hooks and Overrides

Using Hooks to Modify the Interface Without Changing Core Code

Dolibarr provides a hook system that allows you to modify the interface without altering the core software.

  1. Identify the hook corresponding to the page you want to modify.
  2. Create a PHP file inside the custom folder.
  3. Add a hook to modify the display of a module.

Example of adding a custom field to the customer profile page:

php
function formObjectOptions($parameters, &$object, &$action, $hookmanager) { if ($object->element == 'societe') { print '<tr><td>Custom Field:</td><td><input type="text" name="custom_field"></td></tr>'; } }

Using Overrides to Modify Menus Without Editing Core Files

Overrides allow you to customize Dolibarr menus and functions without modifying original files.

  1. Copy the relevant menu file to the custom folder.
  2. Modify the order of menu items or add specific links.
  3. Save and reload Dolibarr.

Conclusion

Customizing Dolibarr is a great way to tailor the ERP system to specific business needs. By modifying the interface settings, managing menus, and using advanced techniques like hooks and overrides, Dolibarr becomes a user-friendly and efficient tool for daily business management.

By applying these best practices, you can enhance user experience and increase productivity, while maintaining an easily scalable and maintainable system.

Comments

Log in or register to post comments