Created by St├ęphane Debauche (std)
1 year ago by Thibault Delavallee (tde)

[MERGE][ADD] mail(_list): move mailing lists to their own module


Discussion channels currently have two main operating modes: Discuss channels
(classic, chat, livechat) and Mailing lists (activated through "send email"
checkbox). This current model has several drawbacks

* mailing lists are meant to be used by external people. Discuss/Inbox
display has no use for external people;
* mailing lists have a frontend page (website_mail_channel) that also
displays private channels (if people have access) content, which makes
no sense;
* moderation is available only on mailing lists, meaning the moderation
mechanism is useless for a majority of channels;
* incoming Discord-like behavior of channels will further make mailing
lists different from chat channels;


Split mailing list from discussion channels. Purpose of this new module
is to manage the mailing lists. Now they are no more <mail.channel>
with email_send set to True but instead use their own model.


The mailing list is basically a public discussion that users can have
by email. They can respond to email, send new messages, etc... All the
members of the mailing list will receive the message by email.

Users can moderate the emails of the mailing list in the same way as
they did with the "email" mail channel.
- *accept*, will accept the emails and send it to the members of the
mailing list
- *discard*, will drop the email without warning the author
- *reject*, will drop the email and send a notification email to the
- *allow*, will accept the email and all other pending emails of the
same author and create a whitelist for him
- *ban* will drop the email and all other pending emails of the same
author and create a blacklist for him

Now a portal view is available (in /groups) and replace the old module
"Website Mail Channel" that was removed in the previous commit. In this
view, users can subscribe / unsubscribe to the mailing lists and some
links to this portal view are added in the footer of the emails of the
mailing list.

As before with mail channels, you can send guidelines to the members,
notify the moderators whose an action is required (in a CRON), send back
an email to the author of an email to say "Your message is waiting


See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600