[19.0][MIG] mail_gateway: Migration to 19.0 - #202
Conversation
1be4c70 to
92a3b09
Compare
|
Thanks for the move. I'm afraid you have lost the commit history. You should do a similar method than the migration one, but adding an extra remote for OCA/social. |
5e50ef4 to
7c9d8cc
Compare
yes, I did. |
|
Can you check CIs? |
0ec67ff to
a649485
Compare
56e4d37 to
6e924d8
Compare
huan-tq
left a comment
There was a problem hiding this comment.
Functional Testing:
- The Menus introduced by this module are available.
- The Gateway buttons are available throughout the system.
- This is a base module intended to be extended by other
mail_gatewaymodules.
LGTM.
8706f65 to
e169248
Compare
Currently translated at 34.6% (51 of 147 strings) Translation: social-18.0/social-18.0-mail_gateway Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_gateway/gl/
Currently translated at 100.0% (147 of 147 strings) Translation: social-18.0/social-18.0-mail_gateway Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_gateway/es/
…om gateway discuss to a record Before this changes when creating the new message when pressing link button, notifications where created too. So the message was notified to the record followers. After this changes, the message is created but not notified to the followers.
Currently translated at 95.9% (141 of 147 strings) Translation: social-18.0/social-18.0-mail_gateway Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_gateway/gl/
Currently translated at 98.6% (145 of 147 strings) Translation: social-18.0/social-18.0-mail_gateway Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_gateway/gl/
Odoo 18 renamed the Thread record field `lastInterestDateTime` to `lastInterestDt` (defined in mail/static/src/core/common/thread_model.js; used by the "chats" category sort in mail/static/src/core/public_web/discuss_app_category_model.js). The 17.0 patch was ported unchanged, so `compareDatetime()` compares `undefined` with `undefined` and silently falls back to `t2.id - t1.id`: gateway channels end up stacked by creation order instead of last activity. Use the 18.0 field name so the gateway category is sorted by last interest again, most recent first.
The patch on Store.one_id is applied at import time, so it is shared by every registry served by the process, while gateway_channel_ids only exists in the registries where mail_gateway is installed. A database without the module, served by a worker that already imported it, fails with an AttributeError inside session_info(), which leaves its whole backend unreachable. Check the registry the call actually runs against before reading the field.
Core only allows this if ["channel", "group"].includes(this.channel_type). See https://github.com/odoo/odoo/blob/5249e0b082cfff650e1dad36aade470cf25a1ad5/addons/mail/static/src/core/common/thread_model.js#L90
…ll a member Otherwise, bus notifications keep arriving after leaving the channel, and an AccessError is raised because the user is no longer a member.
…ateway_user security group The members in the gateway are used to set the default members for new channels. However, in day-to-day use, if new users are added to the mail_gateway.gateway_user group, they do not automatically become members of existing channels. With the native option to invite people, new users can join the channel. However, for security reasons, we limit this to users who belong to the mail_gateway.gateway_user group. Core has a feature that uses the group_public_id field to set a group that restricts which users can be invited. However, this only works when channel_type = 'channel'. See https://github.com/odoo/odoo/blob/5249e0b082cfff650e1dad36aade470cf25a1ad5/addons/mail/models/discuss/discuss_channel.py#L90
Store.one_id() builds the reference to a record rather than its content, and its docstring asks callers to avoid it. Sending the gateway channels from a res.partner._to_store() override instead, the way hr_holidays and im_livechat extend partner store data, removes the need for the registry guard added in #1913: a model override only exists in the registries where its module is installed. _thread_to_store() read the channels back from the follower references and passed them on as gateway_followers without ever adding the partners to the store, so it relates them with Store.many() now.
|
This PR has the |
05a1bff to
c0254e9
Compare
It should be fixed now. thank you |
|
/ocabot merge nobump |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 48b10d3. Thanks a lot for contributing to OCA. ❤️ |
[MIG] mail_gateway: Migration to 19.0