7
votes

I am using Odoo v.8. I want to find out where Odoo finds information where the modules are, to load them. I am aware there is a variable addons_path in the file openerp-server.conf. The only file I have found the variable in is opt/odoo/odoo/debian/openerp-server.conf. It has the following value:

addons_path = /usr/lib/python2.7/dist-packages/openerp/addons 

However, the Odoo application is using modules from "/opt/odoo/odoo/addons" path. Where the Odoo retrieves this information from? If I have a new directory with new modules, where I can update the path? I have updated addons_path in opt/odoo/odoo/debian/openerp-server.conf with new modules path, but Odoo still cannot see the modules in Settings/Update Modules List. I have restarted the server.

Thanks for your help!

3

3 Answers

6
votes

You can add to the addons_path directive in openerp-server.conf, (separate paths with a comma) or you can use --addons= if starting your server from the command line.

2
votes

Odoo tries to initializes a set of paths to be loaded from the base addons directory. Check the code for Odoo system path

So, with the help of this method, it loads the basic addons directory and other directories that are added by addons_path.

Generally, we use addons_path at odoo-server.conf and save our addons directory path at it.

Note: the path must contain atleast one OpenERP/Odoo module in it.

2
votes

As of Odoo V8, the "default" addons_path in the odoo-server.conf file should read as follows (assuming you installed Odoo in the "/opt/odoo" path, otherwise change accordingly):

addons_path = /opt/odoo/addons

If you also need to add another "custom" folder for additional modules, separate those with a comma, like this:

addons_path = /opt/odoo/addons,/opt/odoo/custom_modules