Skip to content

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 20, 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: #199936

@robodoo
Copy link
Contributor

robodoo commented Mar 20, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 20, 2025

@Atovange cherrypicking of pull request #199936 failed.

stdout:

Auto-merging addons/bus/models/bus_presence.py
Auto-merging addons/bus/static/src/im_status_service.js
Auto-merging addons/bus/static/tests/legacy/im_status_tests.js
Auto-merging addons/bus/tests/test_ir_websocket.py
CONFLICT (modify/delete): addons/hr_holidays/static/src/persona_model_patch.js deleted in d22b17087382a4ed5d5085320dcf7228cbd67161 and modified in c6291c3ddd7c4069b9e97b8769ad4937df248d6e.  Version c6291c3ddd7c4069b9e97b8769ad4937df248d6e of addons/hr_holidays/static/src/persona_model_patch.js left in tree.
Auto-merging addons/hr_holidays/static/tests/im_status.test.js
CONFLICT (content): Merge conflict in addons/hr_holidays/static/tests/im_status.test.js
Auto-merging addons/mail/static/src/core/common/im_status_service_patch.js
CONFLICT (content): Merge conflict in addons/mail/static/src/core/common/im_status_service_patch.js
Auto-merging addons/mail/static/tests/discuss_app/im_status.test.js
Auto-merging addons/mail/tests/discuss/test_bus_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 Mar 20, 2025
@C3POdoo C3POdoo added the RD research & development, internal work label Mar 20, 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: ff16614
@Atovange Atovange force-pushed the saas-17.4-17.0-homeworking-status-gito-419876-fw branch from 2d49b43 to 8eb7430 Compare March 25, 2025 13:20
@C3POdoo C3POdoo requested review from a team, BastienFafchamps, Julien00859 and aab-odoo and removed request for a team March 25, 2025 13:23
@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 28, 2025

@Atovange this forward port of #199936 is awaiting action (not merged or closed).

@Atovange
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Mar 28, 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 #202776

X-original-commit: ff16614
Signed-off-by: Giorgio Tocco (gito) <gito@odoo.com>
@robodoo robodoo closed this Mar 28, 2025
@fw-bot fw-bot deleted the saas-17.4-17.0-homeworking-status-gito-419876-fw branch April 4, 2025 10:27
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