Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: IM Bus

Entity: res.users

Compute Method: _compute_im_status

View 17.0
Inputs Method Outputs
- """Compute the im_status of the users"""
- presence_by_user = {
-             presence.user_id: presence.status
-             for presence in self.env["bus.presence"].search([("user_id", "in", self.ids)])
-         }
- for user in self:
-             user.im_status = presence_by_user.get(user, "offline")
  • im_status

Back to entity