Skip to Content
Menu
This question has been flagged

Hi,


is it possible or how is it possible to display data from a model in realtime on the website?

Do I have to create a socket connection from the server (over an extra port with proxy redirection) to the client and implement both socket endpoints in python and javascript by myself?

Or is there a standard odoo way to implement something like that?


Thanks!

Avatar
Discard
Best Answer

Hi @Manu Miu

There are tools for doing what you need and examples in the Odoo modules website_livechat, im_livechat, im_chat and bus.

All of those modules bring you the tools and how to do that tasks. It will not be easy but they are there implemented for doing that kind of stuffs. Review carefully the bus js files and how they are used in the other modules

Avatar
Discard

A little sidenote here: the performance for the bus js files isn't very good so you might want to keep an eye out for that too. I once had a talk with the Odoo developers and they where talking about not using it to refresh data every few seconds.

Author

@Axel Mendoza: Thank you! That's what I wanted to know. But @Yenthe's sidenote causes me a headache, because I don't want to transport as few data as a chat and not every few seconds. It's a little bit more and should be in real-time. Would be absolutely no problem with socket.io but I want to realise this project with odoo. So would you advice me against odoo for a real-time data project?

All depends on what data you need to display and who produce it and what it's the relation of that data with Odoo. You could use Odoo to build the website that display the data using socket.io and websockets using another service to return the data using a solution like nginx to upgrade the http connection to 1.1 and acting as a reverse proxy for your websocket service. I do this for our webrtc solution in Odoo using a solution developed in nodejs for that matter. In my case I need to use it with crm meetings and that's my reason to use Odoo for that end.

Hi @axel, @Yenthee, I am in similar problem, i am developing live tracking like uber in odoo, which track the location of vechiles.How can i implement this?

Related Posts Replies Views Activity
0
May 22
3412
2
Feb 16
4614
0
Sep 23
498
0
Sep 23
451
2
Feb 23
9253