Friday, February 6, 2026
1 change · master
Code cleanup and technical improvements
This update simplifies how user status indicators (im_status) are customized. Instead of directly changing the status string, a new data payload is used to provide context, allowing the front-end to dynamically adjust displays like icons without altering the original status. This improves flexibility and reduces complexity for future updates.
Original PR description
community PR: https://github.com/odoo/odoo/pull/210189 This commit improves how we apply overrides to the im_status without mutating its original value. Previously, customizing `im_status` required changing the status string itself (for example, “online” would become “leave_online” or “home_online”). This approach made it cumbersome for the front end to interpret and display the correct status. Now, instead of altering the `im_status` string, we keep it intact and introduce a separate data payload to indicate any special conditions (such as “on leave” or “working from home”). We register these overrides in the `im-status-data` registry, which contains the metadata needed for each condition like title, icon, and aria-label. At render time, the front end checks this registry and applies the appropriate override (for instance, switching the icon to fa-plane when the user is on leave) without ever modifying the original status string.