What is the Use of the Bus in Odoo?

In Odoo, the bus module (also called bus service or bus system) is used for real-time communication between the server and the client browser). It's essential for implementing instant messaging, notifications, real-time UI updates, and features like live chat or POS updates.

The bus system allows the server to push data to the client in real time using long polling.

Sending instant notifications to users

Triggering UI updates without page reloads


Implementing real-time chat (like Discuss or Live Chat)


If you want to send messages using the built-in notification system (e.g., like Discuss notifications), you can also use:



self.env['bus.bus']._sendone((self._cr.dbname, 'res.partner', user.partner_id.id), {

    'type': 'simple_notification',

    'title': 'Alert!',

    'message': 'Something happened!',

})