PURPOSE Improves various views related to the mass mailing lists to help the user to check the "health" of its lists at a glance. SPECS Introduce statistic fields on mailing.list: - Total number of contacts (replaces the previous number of valid emails) - Number of valid email contacts - Number of valid SMS contacts - Number of mailings sent using the list - Percentage (and total count) of opted-out contacts - Percentage (and total count) of blacklisted contacts - Percentage of contacts having at least one bounced message The statistics are shown on the kanban and also on the form view where they are used to quickly reach the associated mailings / contacts. Demo data were slightly adapted to show more interesting demos on views. On a technical point of view, the various counts of contacts are made in a single query using CASE WHEN syntax. We need some entry points in the query to be able to dynamically add fields and joins in the mass_mailing_sms app, but it's better than copy/pasting multiple times a very similar query. LINKS Task 2182622 UPG PR odoo/upgrade#1990 closes odoo/odoo#53221 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
79 lines
3.9 KiB
XML
79 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="assets_backend" name="mass_mailing assets" inherit_id="web.assets_backend">
|
|
<xpath expr="." position="inside">
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing_mobile.scss"/>
|
|
<link rel="stylesheet" href="/mass_mailing/static/src/css/email_template.css"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing.ui.jw.scss"/>
|
|
|
|
<script type="text/javascript" src="/mass_mailing/static/src/js/mass_mailing.js"></script>
|
|
<script type="text/javascript" src="/mass_mailing/static/src/js/mass_mailing_widget.js"></script>
|
|
</xpath>
|
|
<xpath expr="//script[last()]" position="after">
|
|
<script type="text/javascript" src="/mass_mailing/static/src/js/unsubscribe.js"></script>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="assets_mail_themes">
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/themes/theme_basic.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/themes/theme_default.scss"/>
|
|
<t t-call="mass_mailing.mass_mailing_mail_style"/>
|
|
</template>
|
|
|
|
<template id="assets_mail_themes_edition"> <!-- maybe to remove and convert into a field dumy with attr invisible if the template is not selected -->
|
|
<t t-call="web._assets_helpers"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing.ui.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/scss/mass_mailing.ui.shadow.scss"/>
|
|
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/webclient.scss"/>
|
|
</template>
|
|
|
|
<template id="iframe_css_assets_edit" groups="base.group_user">
|
|
<t t-call-assets="web.assets_common" t-js="false"/>
|
|
<t t-call-assets="web_editor.assets_wysiwyg" t-js="false"/>
|
|
<t t-call-assets="mass_mailing.assets_mail_themes" t-js="false"/>
|
|
<t t-call-assets="mass_mailing.assets_mail_themes_edition" t-js="false"/>
|
|
</template>
|
|
|
|
<template id="iframe_css_assets_readonly" groups="base.group_user">
|
|
<link rel="stylesheet" type="text/scss" href="/mass_mailing/static/src/css/basic_theme_readonly.css"/>
|
|
</template>
|
|
|
|
<template id="assets_common" name="Mass Mailing Assets Common" inherit_id="web.assets_common">
|
|
<xpath expr="//script[last()]" position="after">
|
|
<script type="text/javscript" src="/mass_mailing/static/src/js/tours/mass_mailing_tour.js"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="qunit_suite" inherit_id="web.qunit_suite_tests">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript">
|
|
odoo.define('mass_mailing.FieldHtml.test', function (require) {
|
|
'use strict';
|
|
var MassMailingFieldHtml = require('mass_mailing.FieldHtml');
|
|
MassMailingFieldHtml.include({jsLibs: []});
|
|
});
|
|
</script>
|
|
<script type="text/javascript" src="/mass_mailing/static/src/js/mass_mailing_snippets.js"/>
|
|
<script type="text/javascript" src="/mass_mailing/static/tests/mass_mailing_html_tests.js"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="mass_mailing_mail_style">
|
|
<style>
|
|
@media screen and (max-width: 768px) {
|
|
.o_mail_col_mv {
|
|
display: block !important;
|
|
width: auto !important;
|
|
}
|
|
.o_mail_table_styles {
|
|
width: 100% !important;
|
|
}
|
|
.o_mail_col_container {
|
|
margin: 0px 0px 10px 0px !important;
|
|
}
|
|
}
|
|
</style>
|
|
</template>
|
|
</odoo>
|