Skip to content

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 2, 2025

Before this commit, the IM status icon shown when the user is homeworking won't always be precise. This happens because of the IM status refactoring (#174814).

Steps to reproduce:

  1. Setup user Marc Demo as homeworking in the current day
  2. As Marc Demo open Discuss
  3. As Mitchell Admin open the conversation with Marc Demo -> the correct home online icon is shown
  4. As Marc Demo close all Odoo tabs -> user goes offline and Mitchell Admin sees the correct offline icon
  5. As Marc Demo reopen Discuss -> Mitchell Admin sees the circle icon instead of the home icon

This commit fixes the issue by sending the user im_status information directly from its indentity model (res.partner or mail.guest) in the bus.bus/im_status_updated notification payload. This ensures that any overrides on the im_status field will be taken into consideration without having to re-establish the override client side.
presence_status now represents the status value of the presence model, while im_status represents the status value of the identity model.

Forward-Port-Of: #204307
Forward-Port-Of: #199936

@robodoo
Copy link
Contributor

robodoo commented Apr 2, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 2, 2025

@Atovange cherrypicking of pull request #199936 failed.

stdout:

CONFLICT (modify/delete): addons/bus/models/bus_presence.py deleted in ae3e283328d5736a81eec42a30e576b278339c80 and modified in 4c76fc7f9f39602629f5c0f929af82ddcde1d3bf.  Version 4c76fc7f9f39602629f5c0f929af82ddcde1d3bf of addons/bus/models/bus_presence.py left in tree.
Auto-merging addons/bus/tests/test_ir_websocket.py
CONFLICT (content): Merge conflict in addons/bus/tests/test_ir_websocket.py
Auto-merging addons/bus/tests/test_websocket_controller.py
CONFLICT (content): Merge conflict in addons/bus/tests/test_websocket_controller.py
Auto-merging addons/hr_holidays/static/tests/im_status.test.js
Auto-merging addons/im_livechat/tests/test_message.py
CONFLICT (content): Merge conflict in addons/im_livechat/tests/test_message.py
Auto-merging addons/mail/static/src/core/common/im_status_service.js
CONFLICT (content): Merge conflict in addons/mail/static/src/core/common/im_status_service.js
CONFLICT (modify/delete): addons/mail/static/src/core/common/im_status_service_patch.js deleted in ae3e283328d5736a81eec42a30e576b278339c80 and modified in 4c76fc7f9f39602629f5c0f929af82ddcde1d3bf.  Version 4c76fc7f9f39602629f5c0f929af82ddcde1d3bf of addons/mail/static/src/core/common/im_status_service_patch.js left in tree.
Auto-merging addons/mail/static/tests/discuss/im_status.test.js
CONFLICT (content): Merge conflict in addons/mail/static/tests/discuss/im_status.test.js
Auto-merging addons/mail/static/tests/discuss_app/im_status.test.js
Auto-merging addons/mail/tests/discuss/test_discuss_mail_presence.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels Apr 2, 2025
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 2, 2025
Before this commit, the IM status icon shown when the user is
homeworking won't always be precise. This happens because of the IM
status refactoring (odoo#174814).

Steps to reproduce:
1. Setup user Marc Demo as homeworking in the current day
2. As Marc Demo open Discuss
3. As Mitchell Admin open the conversation with Marc Demo -> the
correct home online icon is shown
4. As Marc Demo close all Odoo tabs -> user goes offline and Mitchell
Admin sees the correct offline icon
5. As Marc Demo reopen Discuss -> Mitchell Admin sees the circle icon
instead of the home icon

This commit fixes the issue by sending the user im_status information
directly from its indentity model (`res.partner` or `mail.guest`) in
the `bus.bus/im_status_updated` notification payload. This ensures
that any overrides on the `im_status` field will be taken into
consideration without having to re-establish the override client side.
`presence_status` now represents the status value of the presence
model, while `im_status` represents the status value of the identity
model.

X-original-commit: c74ef6a
@Atovange Atovange force-pushed the saas-18.2-17.0-homeworking-status-gito-426946-fw branch from 6fcfa4a to 61216b3 Compare April 8, 2025 10:37
@C3POdoo C3POdoo requested review from a team April 8, 2025 10:59
@Atovange
Copy link
Contributor

Atovange commented Apr 8, 2025

@robodoo r+

robodoo pushed a commit that referenced this pull request Apr 8, 2025
Before this commit, the IM status icon shown when the user is
homeworking won't always be precise. This happens because of the IM
status refactoring (#174814).

Steps to reproduce:
1. Setup user Marc Demo as homeworking in the current day
2. As Marc Demo open Discuss
3. As Mitchell Admin open the conversation with Marc Demo -> the
correct home online icon is shown
4. As Marc Demo close all Odoo tabs -> user goes offline and Mitchell
Admin sees the correct offline icon
5. As Marc Demo reopen Discuss -> Mitchell Admin sees the circle icon
instead of the home icon

This commit fixes the issue by sending the user im_status information
directly from its indentity model (`res.partner` or `mail.guest`) in
the `bus.bus/im_status_updated` notification payload. This ensures
that any overrides on the `im_status` field will be taken into
consideration without having to re-establish the override client side.
`presence_status` now represents the status value of the presence
model, while `im_status` represents the status value of the identity
model.

closes #204485

X-original-commit: c74ef6a
Signed-off-by: Giorgio Tocco (gito) <gito@odoo.com>
@robodoo robodoo closed this Apr 8, 2025
@fw-bot fw-bot deleted the saas-18.2-17.0-homeworking-status-gito-426946-fw branch April 15, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants