anch'io preferisco usare addons_path e preferisco usare il file di configurazione
però se inserisco più di un percorso ho dei problemi
ho scaricato i repo bazaar in ~/openerp e questa è la struttura:
openerp
|-- addons
|-- client
|-- doc
|-- openobject-italia
|-- server
`-- web
se .openerp_serverrc contiene solo il percorso agli addon di web funziona tutto:
$ ./openerp-server
2012-04-17 11:12:46,037 7160 INFO ? openerp: OpenERP version 6.1
2012-04-17 11:12:46,044 7160 INFO ? openerp: addons paths: /home/fede/openerp/web/addons
2012-04-17 11:12:46,044 7160 INFO ? openerp: database hostname: localhost
2012-04-17 11:12:46,044 7160 INFO ? openerp: database port: 5432
2012-04-17 11:12:46,044 7160 INFO ? openerp: database user: openerp
2012-04-17 11:12:46,044 7160 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-04-17 11:12:46,044 7160 INFO ? openerp.netsvc: Starting 1 services
2012-04-17 11:12:46,186 7160 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-04-17 11:12:46,673 7160 INFO ? openerp.addons.web: embedded mode
2012-04-17 11:12:46,822 7160 INFO ? openerp: OpenERP server is running, waiting for connections...
Se invece aggiungo anche gli addon, in questo modo:
addons_path = /home/fede/openerp/web/addons,/home/fede/openerp/addons
Ottengo vari errori:
$ ./openerp-server
2012-04-17 11:17:12,056 7331 INFO ? openerp: OpenERP version 6.1
2012-04-17 11:17:12,056 7331 INFO ? openerp: addons paths: /home/fede/openerp/web/addons,/home/fede/openerp/addons
2012-04-17 11:17:12,056 7331 INFO ? openerp: database hostname: localhost
2012-04-17 11:17:12,056 7331 INFO ? openerp: database port: 5432
2012-04-17 11:17:12,056 7331 INFO ? openerp: database user: openerp
2012-04-17 11:17:12,057 7331 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-04-17 11:17:12,057 7331 INFO ? openerp.netsvc: Starting 1 services
2012-04-17 11:17:12,072 7331 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-04-17 11:17:12,231 7331 INFO ? openerp.addons.web: embedded mode
2012-04-17 11:17:12,482 7331 CRITICAL ? openerp.modules.module: Couldn't load module web
2012-04-17 11:17:12,482 7331 CRITICAL ? openerp.modules.module: No module named openid
2012-04-17 11:17:12,482 7331 ERROR ? openerp: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
File "./openerp-server", line 252, in <module>
openerp.modules.module.load_openerp_module(m)
File "/home/fede/openerp/server/openerp/modules/module.py", line 419, in load_openerp_module
getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
File "/home/fede/openerp/web/addons/web/__init__.py", line 29, in wsgi_postload
app = common.http.Root(o)
File "/home/fede/openerp/web/addons/web/common/http.py", line 453, in __init__
static_dirs = self._load_addons(openerp_addons_namespace)
File "/home/fede/openerp/web/addons/web/common/http.py", line 523, in _load_addons
m = __import__('openerp.addons.' + module)
File "/home/fede/openerp/server/openerp/modules/module.py", line 139, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/home/fede/openerp/addons/auth_openid/__init__.py", line 23, in <module>
import controllers
File "/home/fede/openerp/addons/auth_openid/controllers/__init__.py", line 20, in <module>
import main
File "/home/fede/openerp/addons/auth_openid/controllers/main.py", line 36, in <module>
from openid import oidutil
ImportError: No module named openid
2012-04-17 11:17:12,529 7331 INFO ? openerp: OpenERP server is running, waiting for connections...