How To Add Custom Addons Path In Odoo

In this article, I will provide instructions on how to include a personalized addon path in Odoo. As a seasoned Odoo programmer, I have faced scenarios where I needed to include my own customized addons to the current Odoo setup. Through adding a personalized addons path, you can effortlessly integrate your own modules or changes to the Odoo system without impacting its main functionality.

To begin with, it is important to understand the directory structure of an Odoo installation. In the root folder of your Odoo installation, you will find the “addons” folder. This folder contains all the default Odoo modules. However, if you want to add your own custom addons, you need to create a separate directory for them.

To add a custom addons path, follow these steps:

Create a New Directory

Firstly, create a new directory to store your custom addons. You can choose any suitable name for this directory, but it is recommended to keep it descriptive and easy to remember. For example, you can create a directory named “custom_addons” or “my_addons”.

Example:

mkdir custom_addons

Specify the Custom Addons Path

Once you have created the directory for your custom addons, you need to specify the path to this directory in the Odoo configuration file.

Open the configuration file (usually named “odoo.conf” or “openerp-server.conf”) using a text editor. Look for the line that starts with “addons_path”. This line specifies the default addons path for Odoo.

To add your custom addons path, append the path to your directory after the existing addons paths, separating each path with a comma. Make sure to provide the full absolute path to your custom addons directory.

Example:

addons_path = /path/to/default/addons,/path/to/custom_addons

Save and close the configuration file once you have added the custom addons path.

Restart Odoo Server

The final step is to restart the Odoo server for the changes to take effect. You can do this by stopping and starting the Odoo service, or by using the command line.

If you are using a Linux-based system, you can restart the Odoo service using the following command:

sudo service odoo restart

On Windows, you can restart the Odoo service by opening the command prompt as an administrator and running the following command:

net stop odoo
net start odoo

Conclusion

Adding a custom addons path in Odoo is a straightforward process that allows you to extend the functionality of the system to meet your specific requirements. By following the steps outlined in this article, you can easily incorporate your own custom addons into Odoo without modifying the core installation.

Remember to double-check the paths and ensure that you have the necessary permissions to access and modify the Odoo installation files. With this knowledge, you can now confidently add your own custom addons to enhance your Odoo experience.