Commit Graph
11 Commits
Author SHA1 Message Date
Thibault Delavallée e5338146e7 [REF] mail: make message belongs to a single thread without listener channels
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

PURPOSE

Remove channel ability to follow records as it mainly adds noise without a lot
of added value. Simplify channel notification flow by using directly members
and not a delegation through a channel self-following trick. Remove followers
being channels and posting with added listeners being channels.

SPECIFICATIONS

In this commit we force messages to belong to a single document using
``model`` / ``res_id`` pair. It is not possible anymore to link a message
to channels using ``channel_ids``. A message belongs to a document and
is displayed in that document's chatter.

This change implies modifying a lot of domains, notably in chatter. Indeed
discuss for channels does not use ``('channel_ids', 'in', [3])`` domains.
They now use ``('model', '=', 'mail.channel'), ('res_id', 'in', [3])`` like
other documents fetching their messages.

This commit also removes ``channel_message_ids`` field on ``mail.channel``
model. As channels are now considered as standard documents they will use
``message_ids`` field like all other documents. Linking a channel on a message
is possible only as a link in message from now on. It is not possible to push
it into a channel anymore (no more listener channels, no more channel link).

Finally a global cleaning also linked to all previous commits is done.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:35 +00:00
Dhruv Patel 4aa47dbf3a [IMP] mail: mark first welcome message as read for the admin
Actually, We don't want to distract the admin with an unnecessary notification
on General Channel. The main focus should be on odoobot's tour, not on the
general channel's welcome message. And it is also not a good idea to remove the
general channel as it would reduce the discoverability of the feature.

So, we are marking the first message as read for at least admin user.
therefore admin can not distract over unnecessary welcome notification and
focus more on the rest of the functionality.

Task : 2442023

closes odoo/odoo#66010

X-original-commit: 069923e53fcb93c4cf0a0715d500d23525aafbe7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-11 17:05:28 +00:00
Julien Castiaux db9bf62431 [REF] mail: Use Command helper for x2many
closes odoo/odoo#60965

Task: 2366606
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-30 10:16:09 +00:00
Nidhi Patel 91029b2b32 [FIX] mail: channel #general with default messages
Before this commit, when starting a new database with demo data,
the default channel `#general` had no messages initially.

The demo data defines default messages in this channel, but were
incorrectly linked to this channel, resulting in this channel
containing no messages initially.

The messages did not define `channel_ids`, so it was considered
empty. This field is essential for displaying the message in
channel, so by being omitted these messages are not properly linked
to channels.

This commit fixes the issue by correctly linked this demo messages
to this demo channel, so that `#general` now contains some messages
initially. This commit also removes unused context
`mail_notify_noemail`.

Task-Id 2186300

closes odoo/odoo#49539

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-08 09:36:25 +00:00
Thibault Delavallée efd55ab8a5 [REF] various: rename openerp node to odoo in xml files 2016-08-10 15:48:10 +02:00
Fabien Pinckaers 20dbf9190d [FIX] mail: wrong message on general channel 2016-07-11 09:57:30 +02:00
Géry Debongnie 2a80f0a850 [FIX] mail,crm: fix automatic notification emails
They need to have the message_type 'email' instead of 'notification', so
they can be starred in the interface.
2015-10-22 14:43:14 +02:00
Géry Debongnie 4d54a8c0ff [IMP] mail: various ui improvements
including:
- reset scroll position to bottom when leaving channel
- allow clicking on the avatar image
- hide stars when message is of type notification
- sort channel names
- add # before channel names
- rename Whole company channel in general
- replace \n and \r in messages by <br/>
- lighten the hover color of sidebar items in the client action
- Display @ before mentions
2015-10-22 14:43:13 +02:00
Ray Carnes 6820dde909 [FIX] mail: channel description
"announces" is a present tense action verb, and is incorrect in this context
Closes #8282
2015-09-29 17:38:03 +02:00
Thibault Delavallée 2c36354ca9 [RENAME] mail, website_mail, website_mail_group, various: mail.group
model has been renamed to mail.channel to prepare the slack modeling.

In future commits the mail.group model will be merged with the channel
model from im_chat. The first move is to rename mail.group into
mail.channel to have a model that will unite both features.
2015-07-09 11:12:50 +02:00
Thibault Delavallée a316295e36 [RENAME][MOV] mail, website_mail, website_mail_group: mail.group files
renamed to mail.channel.

At this point no model has been renamed; only files have been moved.
n mail, mail_group files have been renamed to mail_channel. The
website_mail_group addon has been renamed to website_mail_channel.
Some internal references have been updated (templates, linked files).
2015-07-09 10:13:41 +02:00