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.
119 lines
7.4 KiB
XML
119 lines
7.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="_assets_primary_variables" inherit_id="web._assets_primary_variables">
|
|
<xpath expr="//link[last()]" position="after">
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/variables.scss"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="assets_backend" name="mail assets" inherit_id="web.assets_backend">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript" src="/mail/static/src/js/many2many_tags_email.js"></script>
|
|
|
|
<script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/discuss.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/discuss_mobile.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/extended_chat_window.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/document_viewer.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/composer.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/services/chat_manager.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/services/chat_window_manager.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/chatter.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/chatter_composer.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/followers.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/form_controller.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/form_renderer.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/basic_model.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/basic_view.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/thread.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/thread_field.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/systray.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/tour.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/utils.js"></script>
|
|
<script type="text/javascript" src="/mail/static/src/js/activity.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/announcement.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/discuss.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/chat_window.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/extended_chat_window.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/composer.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/chatter.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/followers.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/thread.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/systray.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mail/static/src/scss/mail_activity.scss"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="qunit_suite" name="mail_tests" inherit_id="web.qunit_suite">
|
|
<xpath expr="//t[@t-set='head']" position="inside">
|
|
<script type="text/javascript" src="/mail/static/tests/chat_window_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/chatter_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/mail_utils_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/discuss_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/systray_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/discuss_moderation_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/helpers/mock_server.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/helpers/test_utils.js"></script>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="qunit_mobile_suite" name="mail_mobile_tests" inherit_id="web.qunit_mobile_suite">
|
|
<xpath expr="//t[@t-set='head']" position="inside">
|
|
<script type="text/javascript" src="/mail/static/tests/discuss_mobile_tests.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/helpers/mock_server.js"></script>
|
|
<script type="text/javascript" src="/mail/static/tests/helpers/test_utils.js"></script>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="message_origin_link">
|
|
<p>This <t t-esc="self._description.lower()"/> has been <span t-if="edit">modified</span><span t-if="not edit">created</span> from:
|
|
<t t-foreach="origin" t-as="o">
|
|
<a href="#" t-att-data-oe-model="o._name" t-att-data-oe-id="o.id"> <t t-esc="o.display_name"/></a><span t-if="origin.ids[-1:] != o.ids">, </span>
|
|
</t>
|
|
</p>
|
|
</template>
|
|
|
|
<template id="message_user_assigned">
|
|
<p style="margin: 0px;">
|
|
<span>Dear <t t-esc="object.user_id.name"/>,</span><br />
|
|
<span style="margin-top: 8px;">You have been assigned to the <t t-esc="object._description.lower()"/> <t t-esc="object.name_get()[0][1]"/>.</span>
|
|
</p>
|
|
<p style="margin-top: 24px; margin-bottom: 16px;">
|
|
<a t-att-href="'/mail/view?model=%s&res_id=%s' % (object._name, object.id)" style="background-color:#875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px;">
|
|
View <t t-esc="object._description.lower()"/>
|
|
</a>
|
|
</p>
|
|
</template>
|
|
|
|
<template id="message_activity_done">
|
|
<div>
|
|
<p>
|
|
<strong><span t-attf-class="fa #{activity.activity_type_id.icon}"/></strong> <span t-field="activity.activity_type_id.name"/> done
|
|
by <span t-field="activity.user_id.name"/><span t-if="activity.summary">:</span>
|
|
<span t-if="activity.summary" t-field="activity.summary"/>
|
|
</p>
|
|
<div t-field="activity.note" style="margin-left: 8px;"/>
|
|
<div t-if="activity.feedback" style="margin-top: 8px;">
|
|
<strong> Feedback</strong>
|
|
<div t-field="activity.feedback" style="margin-left: 8px;"></div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<template id="mail_bounce_catchall">
|
|
<div>
|
|
<p>Hello <t t-esc="message['email_from']"/>,</p>
|
|
<p>The email sent to <t t-esc="message['to']"/> cannot be processed. This address
|
|
is used to collect replies and should not be used to directly contact <t t-esc="res_company.name"/>.</p>
|
|
<p>Please contact us instead using <a t-att-href="'mailto:%s' % res_company.email"><t t-esc="res_company.email"/></a></p>
|
|
<p>Regards,</p>
|
|
<p>The <t t-esc="res_company.name"/> team.</p>
|
|
</div>
|
|
<blockquote><t t-esc="message['body']"/></blockquote>
|
|
</template>
|
|
|
|
</data>
|
|
</odoo>
|