Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
854 Zobrazení

Whenever I talk to the Odoobot, the bot's answer is displayed before my question, for example:

Odoobot: answer
User: question

However, when I refresh the page, the order is fixed:

User: question
Odoobot: answer

Is this a configuration error? Maybe related to longpolling? Anyone knows why is this happening?

Avatar
Zrušit
Nejlepší odpověď

This issue — where OdooBot's answer appears before the user's question in the Discuss module or live chat — is not a configuration error per se, but more likely a race condition or frontend rendering timing issue due to longpolling or improper message sequencing in Odoo 17.


Reason:

Odoo uses bus.longpolling to handle real-time chat messages. When a user sends a message to OdooBot, the following happens:

  1. User input is sent and logged.
  2. The bot processes it and sends a reply.
  3. Both messages (user’s and bot’s) arrive at the browser nearly at the same time.
  4. If the frontend doesn't strictly order the messages based on timestamps or message IDs, you may see the reply displayed before the question.

After a page refresh, the order is corrected because messages are re-rendered based on proper history/timestamp.


If you want a working implementation, I can provide a small custom module or exact JS file override for your version of Odoo 17 (Community or Enterprise).

Thanks & Regrads, 

Email :- contact@datainteger.com 

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 24
1515
1
pro 23
1453
1
čvn 24
1262
0
úno 25
377
3
dub 25
809