Where does OpenERP (Odoo) find the module path?

I am using Odoo v.8. I want to find out where Odoo finds information, where the modules are in order to download them. I know that there is an addons_path variable in the openerp-server.conf file. The only file I found the variable in is opt / odoo / odoo / debian / openerp-server.conf. It has the following meaning:

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

However, the Odoo application uses modules from the path "/ opt / odoo / odoo / addons". Where does Odoo retrieve this information? If I have a new directory with new modules, where can I update the path? I updated addons_path in opt / odoo / odoo / debian / openerp-server.conf with the new module pool, but Odoo still cannot see the modules in the "Settings / Update modules" list. I restarted the server.

Thank you for your help!

+6
source share
3 answers

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

+5
source

Odoo is trying to initialize a set of paths to load from the base add-ons directory. Check code for Odoo system path

So, with this method, it loads the base add-ons directory and other directories that addons_path adds .

Typically, we use addons_path in odoo-server.conf and save our path to addon directories on it.

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

+2
source

As with Odoo V8, the "default" addons_path in the odoo-server.conf file should look like this (if you set Odoo to the path "/ opt / odoo", otherwise change it accordingly):

 addons_path = /opt/odoo/addons 

If you also need to add another β€œregular” folder for additional modules, separate them with a comma, for example:

 addons_path = /opt/odoo/addons,/opt/odoo/custom_modules 
+1
source

Source: https://habr.com/ru/post/981308/


All Articles