标签:
This module is based on the socket.io real time implementation. It inherit Of the modules web_longpolling and web_socketio on bitbucket.
example conf for nginx:
worker_processes 1; events { worker_connections 1024; } http { server { listen 80; server_name www.myopenerp.fr; location /socket.io { proxy_pass http://127.0.0.1:8068; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_redirect off; } location / { proxy_pass http://127.0.0.1:8069; } } }
/etc/hosts:
127.0.0.1 www.myopenerp.fr
the port:
8069: the OpenERP server 8068: the SocketIO server
/socketio is the default path to dispatch the poll
Example of buildout configuration:
[buildout] parts = openerp versions = versions extensions = gp.vcsdevelop vcs-extend-develop = git+http://github.com/buildout/buildout.git#egg=zc.buildout vcs-update = true develop = web_socketio/oe_web_socketio [openerp] recipe = anybox.recipe.openerp[bzr]:server version = bzr lp:openobject-server/7.0 openerp-server last:1 addons = bzr lp:openobject-addons/7.0 openerp-addons last:1 bzr lp:openerp-web/7.0 openerp-web last:1 subdir=addons hg http://bitbucket.org/anybox/web_socketio web_socketio default hg http://bitbucket.org/anybox/web_im web_im default eggs = oe.web.socketio openerp_scripts = nosetests=nosetests command-line-options=-d oe_web_socketio=oe_web_socketio [versions] lxml = 2.3.3 docutils = 0.9 collective.recipe.sphinxbuilder = 0.7.3 pyparsing = 1.5.6 Werkzeug = 0.8.3
Build the buildout:
bin/buildout -c buildout.cfg
Run the OpenERP server in the first shell:
bin/start_openerp -d mydb -i web_im
Run the Gevent SocketIO server in the second shell:
./bin/oe_web_socketio -d mydb
You must get the modules web_socketio, web_longpolling and web_im:
hg clone http://bitbucket.org/anybox/web_socketio hg clone http://bitbucket.org/anybox/web_im
Install the python eggs needed for gevent_socketio:
pip install gevent pip install gevent_psycopg2 pip install gevent_socketio
Run the OpenERP server in the first shell:
oe -d mydb -i web_im
Run the Gevent SocketIO server in the second shell:
python web_socketio/web_socketio/server.py -d mydb
In the web client the Instant Massaging is loaded only if the user is connected and this user has got a IM user linked.
Only the administrator can add new IM user. You can configure IM user in Instant Messaging/Setting/Users`. Filled the name and the user linked.
In the consiguration of the user, in the page Instant Messaging of the notebook. You can configure the advanced configuration for this user:
Group of Instant Messaging: The IM group for the IM user, If no group are selected then the user will have the No group group
The administrator can also create new IM group in Instant Messaging/Setting/Groups.
TODO
TODO
TODO
TODO
Refactor the user list:
Sort the user by connection state
Add an icon to show the state of the connection of the user list
let the color of the user in black
replace the select html by ul and li node
move the advanced configuration from res.user to im.user
add image on im.user, if not filled then take on the res.users
Update the documentation
Add multichater room notion
Update the documentation
Update the documentation
Instant Messaging for OpenERP v7
标签:
原文地址:http://www.cnblogs.com/chjbbs/p/4252013.html