Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
6 Vastaukset
24527 Näkymät

I'm running Odoo as a service on CentOS 7.  There is a blank file at /etc/openerp-server.conf.  I have been trying to add a custom modules directory path to this file, but everything I've tried has made it so that the service won't start up again, and doesn't output any helpful error messages.  What is the proper way to tell the service to look for a custom module directory?

Avatar
Hylkää
Tekijä Paras vastaus

In /etc/openerp-server.conf:

- Add a header section, like [options].  I don't think it matters what you put, as long as there is a header.  Otherwise, you'll get:

"ConfigParser.MissingSectionHeaderError: File contains no section headers."

- Add this line:

addons_path=/my/new/addons/path

Don't use any quotes.  I tried that, and the server didn't like it.  Also, as john5000 stated, make sure your addons directory is readable by the server user (openerp).

Avatar
Hylkää
Paras vastaus

There are at least two ways to do this:

  • On the server startup command line put:

--addons-path=<somepath>

  • In the openerp-server.conf file add the line:

addons_path=<somepath>

Notes:

  • Make sure the .conf file you are changing is the one correct one.  Check the startup script. On my system the startup-oe has a "-c" parameter to specify the openerp-server.conf file location.
  • Make sure the openerp-sever.conf file is readable by the user that is starting the server process.

 

Avatar
Hylkää
Tekijä

It's reading the openerp-server.conf file, but gives the error, "File contains no section headers." What section header do I need to use 'addons_path= . . .'?

The .conf file should have "[options]" at the top. That is the only section header.

Tekijä

I made a lucky guess, then. Got it right on the first try, so I thought the header label didn't matter. Thanks for the confirmation that it does!

Paras vastaus

you may use it in odoo-server-conf file with path specifying COMMA, just like below. you may ADD several path's by separting with COMMA.

addons_path = /opt/odoo/9.0-MM/9.0/addons,/home/harmony/workspace/9.0/training

here, training is my custom folder..

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
maalisk. 15
14153
1
maalisk. 15
5197
0
maalisk. 15
3916
1
maalisk. 15
5035
2
heinäk. 22
38304