Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to configure connector-telephony popup (v7.0 openerp asterisk) ?

By
Anabela Damas
on 12/15/14, 7:46 AM 2,383 views

Hi, 

I'm trying to connect openerp v7 with asterisk. 

I've downloaded this: https://github.com/OCA/connector-telephony/tree/7.0 ;

Then the base_phone_popup depends on : hg clone https://bitbucket.org/anybox/web_action_request , for v7 in the folder web_action_request run this comand hg pull && hg update 7.0 . The module web_action_request depends on others like you can check on  https://bitbucket.org/anybox/web_action_request/src/6f817ebba10e?at=7.0 .  

In /asterisk_click2dial/__openerp__.py you can read : 

  It is possible to get a pop-up of the record corresponding to the calling
    party without any action from the user via the module *base_phone_popup*.

I'm trying to do this, but I can't ...

When I try to run this : sudo -u openerp python /opt/openerp/trunk/openerp/addons/web_socketio/server.py -d mydb

Traceback (most recent call last):
  File "/opt/openerp/trunk/openerp/addons/web_socketio/server.py", line 3, in <module>
    from openerp.addons.web_socketio.web_socketio import SocketIO
ImportError: No module named web_socketio.web_socketio

I don't know if I'm missing some configuration, or somethig... If you know a place were it is a tutorial how to make the popup appear when someone is calling us, let me know. 

Thanks

 

 

0
AB
On 2/8/15, 3:14 PM

Shawn,

Thank you so much for offering to help!  I'm new to OpenERP, python, buildout and other things involving programming.  In other words, I'm not a developer but I need to use web_socketio for a project I'm working on, integrating OpenERP with FreeSWITCH.

I used the buildout.cfg on main web_socketio page as a template to install OpenERP 7 and the base_phone_popup module is already installed.  When I run the following command (based on the instructions on the main page), everything seems to work well:

bin/start_openerp -d openerp -i web_socketio --addons-path=/usr/local/src/oe7-python27-project/openerp-addons,/usr/local/src/oe7-python27-project/openerp-web/addons,/usr/local/src/oe7-python27-project/web_action_request,/usr/local/src/oe7-python27-project/web_socketio,/usr/local/src/oe7-python27-project/web_notification

I get the following output:

2015-02-10 15:32:29,937 31948 INFO ? openerp: OpenERP version 7.0
2015-02-10 15:32:29,938 31948 INFO ? openerp: addons paths: /usr/local/src/oe7-python27-project/openerp-addons,/usr/local/src/oe7-python27-project/openerp-web/addons,/usr/local/src/oe7-python27-project/web_action_request,/usr/local/src/oe7-python27-project/web_socketio,/usr/local/src/oe7-python27-project/web_notification
2015-02-10 15:32:29,938 31948 INFO ? openerp: database hostname: localhost
2015-02-10 15:32:29,938 31948 INFO ? openerp: database port: 5432
2015-02-10 15:32:29,939 31948 INFO ? openerp: database user: openerp
2015-02-10 15:32:42,760 31948 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.16` detected
2015-02-10 15:32:48,241 31948 INFO ? openerp.addons.web_socketio.web_socketio: Add namespace '/longpolling'
2015-02-10 15:32:48,249 31948 INFO ? openerp.addons.web_longpolling.namespace: Add long polling event: 'get request' / 'get_request'
2015-02-10 15:32:48,396 31948 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2015-02-10 15:32:48,673 31948 INFO openerp openerp.modules.loading: loading 1 modules...
2015-02-10 15:32:49,305 31948 INFO openerp openerp.modules.loading: loading 85 modules...
2015-02-10 15:32:50,164 31948 INFO openerp openerp.modules.module: module web_socketio: creating or updating database tables
2015-02-10 15:32:50,197 31948 WARNING openerp openerp.addons.base.module.module: module web_socketio: description is empty !
2015-02-10 15:32:50,204 31948 INFO openerp openerp.modules.loading: module web_socketio: loading security/ir.model.access.csv
2015-02-10 15:32:50,569 31948 INFO openerp openerp.modules.module: module web_longpolling: creating or updating database tables
2015-02-10 15:32:50,597 31948 WARNING openerp openerp.addons.base.module.module: module web_longpolling: description is empty !
2015-02-10 15:32:50,773 31948 INFO openerp openerp.modules.module: module web_action_request: creating or updating database tables
2015-02-10 15:32:51,146 31948 INFO openerp openerp.modules.loading: module web_action_request: loading setting.xml
2015-02-10 15:32:51,916 31948 INFO openerp openerp.modules.module: module base_phone_popup: creating or updating database tables
2015-02-10 15:32:52,499 31948 INFO openerp openerp.modules.loading: module base_phone_popup: loading res_users_view.xml
2015-02-10 15:32:59,155 31948 INFO openerp openerp.modules.loading: loading 85 modules...
2015-02-10 15:32:59,179 31948 INFO openerp openerp.modules.loading: loading 85 modules...
2015-02-10 15:32:59,216 31948 INFO openerp openerp.modules.loading: loading 85 modules...
2015-02-10 15:32:59,254 31948 INFO openerp openerp.modules.loading: loading 85 modules...
2015-02-10 15:33:01,263 31948 INFO openerp openerp.modules.loading: Modules loaded.
2015-02-10 15:33:01,290 31948 INFO openerp openerp: OpenERP server is running, waiting for connections...

However, when I run the following command (this is where I experience difficulty):

./bin/oe_web_socketio -d openerp

I get the following error:

Traceback (most recent call last):
  File "./bin/oe_web_socketio", line 55, in <module>
    import oe.web.socketio
  File "/usr/local/src/oe7-python27-project/oe.web.socketio/oe/web/socketio.py", line 3, in <module>
    from openerp.addons.web_socketio.web_socketio import server
  File "/usr/local/src/oe7-python27-project/parts/openerp-server/openerp/modules/module.py", line 132, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
ImportError: No module named web_socketio

Are you able to tell me why it can't find the web_socketio?  This seems like something really simple and I just don't have the knowledge to understand how to fix it.  It's taken me weeks to get to this point so I'd REALLY appreciate any help you can give.  :-)
 

--- Additional info in response to Shawn ---

Unfortunately, that command I'm running (./bin/oe_web_socketio -d openerp) doesn't allow for the --addons-path option to be added.  It only accepts the '-d' option.  I'm using the instructions found on this page -- https://bitbucket.org/anybox/web_socketio -- and that command comes as a specific result of using the Anybox OpenERP buildout recipe.

Shawn, you definitely helped me learn a lot because thanks to your input, I actually found out how to get the program running by modifying several files.  However, I ended up undoing the successful tests I had run with the first command (bin/start_openerp -d openerp).

--- Update ---

I recently got help from the developer of the oe_web_socketio application and he informed me that there was a bug in the program.  He also gave me an example buildout.cfg file that I used to build and run everything successfully!

I'm very grateful to you, Shawn, and the developer, Jean Sebastien Suzanne, for reaching out to me so quickly and helping me get a better understanding of all of these extremely powerful and useful tools.  Thank you so much.

--- Another Update ---

In case anyone is looking, the answer to my question (and help with the original question) can be found here:
https://bitbucket.org/anybox/web_socketio/issue/9/import-error-for-web_socketio-when-running

Thank you again, Shawn, for another good idea.  I'm not the person who made the original post so I can't mark my post as the answer.

 

Alex

--

I live to serve

Can you explain the exact issue? Have you already installed base_phone_popup module or are you facing difficulty at that point?

Shawn Varghese
on 2/9/15, 2:09 PM

I'm new to OpenERP, python, buildout and other things involving programming. In other words, I'm not a developer but I need to use web_socketio for a project I'm working on, integrating OpenERP with FreeSWITCH. I used the buildout.cfg on main web_socketio page as a template to install OpenERP 7. When I run the following command (based on the instructions on the main page), everything seems to work well: bin/start_openerp -d openerp -i web_socketio --addons-path=/usr/local/src/oe7-python27-project/openerp-addons,/usr/local/src/oe7-python27-project/openerp-web/addons,/usr/local/src/oe7-python27-project/web_action_request,/usr/local/src/oe7-python27-project/web_socketio,/usr/local/src/oe7-python27-project/web_notification I get the following output: 2015-02-10 15:32:29,937 31948 INFO ? openerp: OpenERP version 7.0 2015-02-10 15:32:29,938 31948 INFO ? openerp: addons paths: /usr/local/src/oe7-python27-project/openerp-addons,/usr/local/src/oe7-python27-project/openerp-web/addons,/usr/local/src/oe7-python27-project/web_action_request,/usr/local/src/oe7-python27-project/web_socketio,/usr/local/src/oe7-python27-project/web_notification 2015-02-10 15:32:29,938 31948 INFO ? openerp: database hostname: localhost 2015-02-10 15:32:29,938 31948 INFO ? openerp: database port: 5432 2015-02-10 15:32:29,939 31948 INFO ? openerp: database user: openerp 2015-02-10 15:32:42,760 31948 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.16` detected 2015-02-10 15:32:48,241 31948 INFO ? openerp.addons.web_socketio.web_socketio: Add namespace '/longpolling' 2015-02-10 15:32:48,249 31948 INFO ? openerp.addons.web_longpolling.namespace: Add long polling event: 'get request' / 'get_request' 2015-02-10 15:32:48,396 31948 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069 2015-02-10 15:32:48,673 31948 INFO openerp openerp.modules.loading: loading 1 modules... 2015-02-10 15:32:49,305 31948 INFO openerp openerp.modules.loading: loading 85 modules... 2015-02-10 15:32:50,164 31948 INFO openerp openerp.modules.module: module web_socketio: creating or updating database tables 2015-02-10 15:32:50,197 31948 WARNING openerp openerp.addons.base.module.module: module web_socketio: description is empty ! 2015-02-10 15:32:50,204 31948 INFO openerp openerp.modules.loading: module web_socketio: loading security/ir.model.access.csv 2015-02-10 15:32:50,569 31948 INFO openerp openerp.modules.module: module web_longpolling: creating or updating database tables 2015-02-10 15:32:50,597 31948 WARNING openerp openerp.addons.base.module.module: module web_longpolling: description is empty ! 2015-02-10 15:32:50,773 31948 INFO openerp openerp.modules.module: module web_action_request: creating or updating database tables 2015-02-10 15:32:51,146 31948 INFO openerp openerp.modules.loading: module web_action_request: loading setting.xml 2015-02-10 15:32:51,916 31948 INFO openerp openerp.modules.module: module base_phone_popup: creating or updating database tables 2015-02-10 15:32:52,499 31948 INFO openerp openerp.modules.loading: module base_phone_popup: loading res_users_view.xml 2015-02-10 15:32:59,155 31948 INFO openerp openerp.modules.loading: loading 85 modules... 2015-02-10 15:32:59,179 31948 INFO openerp openerp.modules.loading: loading 85 modules... 2015-02-10 15:32:59,216 31948 INFO openerp openerp.modules.loading: loading 85 modules... 2015-02-10 15:32:59,254 31948 INFO openerp openerp.modules.loading: loading 85 modules... 2015-02-10 15:33:01,263 31948 INFO openerp openerp.modules.loading: Modules loaded. 2015-02-10 15:33:01,290 31948 INFO openerp openerp: OpenERP server is running, waiting for connections... However, when I run the following command: ./bin/oe_web_socketio -d openerp I get the following error: Traceback (most recent call last): File "./bin/oe_web_socketio", line 55, in import oe.web.socketio File "/usr/local/src/oe7-python27-project/oe.web.socketio/oe/web/socketio.py", line 3, in from openerp.addons.web_socketio.web_socketio import server File "/usr/local/src/oe7-python27-project/parts/openerp-server/openerp/modules/module.py", line 132, in load_module f, path, descr = imp.find_module(module_part, ad_paths) ImportError: No module named web_socketio Are you able to tell me why it can't find the web_socketio? This seems like something really simple and I just don't have the knowledge to understand how to fix it. It's taken me weeks to get to this point so I'd REALLY appreciate any help you can give. :-)

AB
on 2/10/15, 11:07 AM

Download openerp web_socketio module from github

Odoo
on 2/10/15, 12:34 PM
Thanks for your response.  The web_socketio module was downloaded automatically using hg tool in the buildout.cfg.  Here's the line from the buildout.cfg specifying the dowload:

hg http://bitbucket.org/anybox/web_socketio web_socketio default

The problem seems to be, as Shawn noted, that the web_socketio module is not in the right location and I'm trying to find out where that location is.  I've put it in several locations and modified the openerp-server.conf files to specify the same addons_path that I used to run the openerp-server but nothing is working.

Would you please explain what you mean in more detail if I'm not understanding your suggestion?

Thanks!



On 02/10/2015 12:34 PM, LIBU wrote:
<blockquote cite="mid:1423589695.267749071121216.730132377610556-openerp-75732-forum.post@accounts.odoo.com" type="cite">

Download openerp web_socketio module from github

--
LIBU
Sent by Odoo Inc. using Odoo about Forum Post How to configure connector-telephony popup (v7.0 openerp asterisk) ? (75732)
on 2/10/15, 2:26 PM

I forgot to ask earlier...but when you run odoo and go to the Settings tab in the browser, search for web_socketio. It should show 'installed'. Can you please check this and get back? And if possible, for now, Edit your question instead of adding comments, because it is a little difficult to read. Thanks.

Shawn Varghese
on 2/10/15, 4:07 PM

Glad to hear everything worked out in the end ! Maybe you can mark your post as the answer so that other users know where to look if they face the same issue.

Shawn Varghese
on 2/12/15, 2:02 AM
0
Shawn Varghese
On 2/10/15, 12:28 PM

Ok... I'm not familiar with FreeSwitch, but I think that the problem arises because it cannot find the packages required. In the first statement, you have specified --addons and specified the location of all the required folders.

But in the second statement, there are no --addons specified, which means it will refer the openerp-server.conf file for the addons path, which probably does not contain all the required files.

Your openerp-server.conf file will probably be located in /etc/ folder.

Take the terminal, and type enter the following command:

sudo vi /etc/openerp-server.conf


A file should open up in the terminal. If it does, paste the contents here. It might help us. Let me know if you face any problems.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 12/15/14, 7:46 AM
Seen: 2383 times
Last updated: 3/18/15, 11:17 AM