Purpose of this commit is to allow moderation on incoming messages in discussion channels. On some channels on which moderation is required messages should be in a pending moderation stage. Moderators can accept or refuse messages as well as always allow or ban messages coming from a given set of emails. Channels now have an option to be moderated. Moderators can be added on channels. They have access to a specific UI in Discuss to see and take action on messages waiting for moderation. Concerning mail.thread message that are pending moderation are not notified. It means nobody receives a notification about them. Moderation process calls the notification once the message is validated. Various features included in this commit : * a model is added to store the decision about emails, allow or ban; * access rights are updated so that only moderators can modify moderation fields on message; * specific bus notifications are send to moderated people as well as to moderators on incoming emails as well as when a decision is taken; * options are added on channels to send explanations to moderated emails; * options are added on channels to write and send guidelines explaining why and how moderation is performed; * a reminder is send daily to moderators with remaining messages to moderate; * discuss UI is adapted and a new channel is added below Inbox and Starred giving access to moderation tools; * chanenl UI is adapted allowing to moderate directly inside channels; This commit is linked to task ID 29521. Closes #21921.
53 lines
2.2 KiB
XML
53 lines
2.2 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="mail_moderation_view_tree" model="ir.ui.view">
|
|
<field name="name">mail.moderation.view.tree</field>
|
|
<field name="model">mail.moderation</field>
|
|
<field name="priority">20</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Moderation Lists" editable="bottom">
|
|
<field name="channel_id"/>
|
|
<field name="email"/>
|
|
<field name="status"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="mail_moderation_view_search" model="ir.ui.view">
|
|
<field name="name">mail.moderation.view.search</field>
|
|
<field name="model">mail.moderation</field>
|
|
<field name="priority">25</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Moderation List">
|
|
<field name="channel_id"/>
|
|
<field name="email"/>
|
|
<field name="status"/>
|
|
<filter string="Is Banned"
|
|
name="status_ban" help="Banned Emails"
|
|
domain="[('status', '=', 'ban')]"/>
|
|
<separator/>
|
|
<filter string="Is Allowed"
|
|
name="status_allow" help="Allowed Emails"
|
|
domain="[('status', '=', 'allow')]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="mail_moderation_action" model="ir.actions.act_window">
|
|
<field name="name">Moderation</field>
|
|
<field name="res_model">mail.moderation</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="search_view_id" ref="mail_moderation_view_search"/>
|
|
<field name="context">{'search_default_status_ban': 1}</field>
|
|
</record>
|
|
|
|
<!-- Add menu entry in Settings/Email -->
|
|
<menuitem name="White List / Black List"
|
|
id="mail_moderation_menu"
|
|
parent="base.menu_email"
|
|
action="mail_moderation_action"/>
|
|
</data>
|
|
</odoo>
|