0
votes

I'm trying to intall the asterisk_click2dial module on ODOO and this error comes to me in the log file:

ValueError: Routing: posting a message without model should be with a parent_id (private mesage).
2015-03-09 15:23:38,262 11093 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/home/odoo/odoo/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/home/odoo/odoo/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/openerp/service/server.py", line 281, in app
    return self.app(e, s)
  File "/opt/odoo/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/odoo/openerp/http.py", line 1274, in __call__
    self.load_addons()
  File "/opt/odoo/openerp/http.py", line 1293, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/opt/odoo/openerp/modules/module.py", line 79, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/opt/odoo/addons/base_phone/__init__.py", line 23, in <module>
    from . import wizard
  File "/opt/odoo/addons/base_phone/wizard/__init__.py", line 23, in <module>
    from . import number_not_found
  File "/opt/odoo/addons/base_phone/wizard/number_not_found.py", line 25, in <module>
    import phonenumbers
ImportError: No module named phonenumbers

The problem is just that I installed that module (phonenumbers) plus the py-Asterisk module without errors using pip install phonenumbers and pip install py-Asterisk and the error persists.

I noticed I have at least two versions of python installed (2.6 and 2.7) but both modules are installed at the same version from odoo (I can see the modules in the python2.7 cli when, for example, I write phonenumbers or search).

Has anybody any idea what is happening to me? I'd be gratefull for some specific response. Thanks.

Here the connector's page: OpenERP - Asterisk connector

1

1 Answers

0
votes

Ok, my bad. During odoo instalation I created a virtual environment under the Odoo system user account which was used solely by the Odoo server so I just need to install these modules under that enviorment. This works for me:

First let’s switch from root to the odoo user, then create a new virtual environment called odoo and activate it:

su - odoo

/usr/local/bin/virtualenv --python=/usr/local/bin/python2.7 odoo
source odoo/bin/activate

(If you have the virtual environment created like me just ignore the second line). Before starting the module installation we need to add the path to the PostgreSQL binaries, otherwise the PsycoPG2 module install will fail (I ignored this one too):

export PATH=/usr/pgsql-9.3/bin:$PATH

Then I can do pip install... Thank you all for your help.