Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
864 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 24
1515
1
thg 12 23
1459
1
thg 6 24
1273
0
thg 2 25
381
3
thg 4 25
831