Files
odoo_source/addons/digest/data/digest_data.xml
T
std-odoo b16843230d [IMP] mass_mailing: send a statistics email to the mailing responsible
Purpose
=======
Provide a follow-up/overview of the Mailing 24 hours after its been sent.

Specifications
==============
Send an email to the responsible of the mailing 24 hours the last email
of the mass mailing.

During the link trackers creation, extract the button label if exists
(so we can display them in the statistics email).

Technical remarks
=================
The statistics email is sent to the responsible of each mailing in the
CRON of mass mailing.

Task-2227411

closes odoo/odoo#49836

Related: odoo/upgrade#1094
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-12 11:49:45 +00:00

250 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo><data noupdate="1">
<!-- Email layout: encapsulation when sending (not used in backend display) -->
<template id="digest_mail_layout">
&lt;!DOCTYPE html&gt;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
<style type="text/css">
body {
margin: 0;
padding: 0;
}
@media only screen and (max-width:650px) {
.d-block{
display: block !important;
}
.mobile-hide{
display: none !important;
}
.mobile-w-75{
width: 75% !important;
}
.mobile-w-33{
width: 33% !important;
}
.font-25{
font-size: 25px !important;
line-height: 25px !important;
}
.font-18{
font-size: 18px !important;
line-height: 25px !important;
}
.font-16{
font-size: 16px !important;
line-height: 25px !important;
}
.font-12{
font-size: 12px !important;
line-height: 20px !important;
}
}
</style>
</head>
<body>
<t t-raw="body"/>
</body>
</html>
</template>
<!-- DIGEST MAIN TEMPLATE -->
<template id="digest_mail_main">
<div style="margin:0; padding:0">
<table cellspacing="0" cellpadding="0" align="center" border="0" bgcolor="#eeeeee" style="width:100%; font-family: Arial,Helvetica,Verdana,sans-serif;">
<tr class="mobile-hide" bgcolor="#875a7b"><td height="70"> </td></tr>
<tr bgcolor="#875a7b">
<td align="center" valign="top">
<table bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="border: 1px solid #eeeeee;width: 100%; max-width: 650px; padding: 30px 30px">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" width="580" align="center" style="width:100%; max-width:580px;">
<tr>
<td class="mobile-w-75" style="text-align: left;">
<span class="font-16" style="color:#8F8F8F;font-weight:bold;font-size: 20px; line-height: 30px;" t-field="company.name"/>
<br/>
<div class="font-18" style="color:#282f33;font-weight:bold;font-size: 25px; line-height: 35px; margin-right: 5px; display: inline-block; max-width: 500px;word-break: break-all;" t-esc="title"/>
<div t-if="sub_title" class="font-18" style="color:#282f33;font-weight:bold;font-size: 25px; line-height: 35px; margin-right: 5px; display: inline-block; max-width: 500px;word-break: break-all;" t-esc="sub_title"/>
<div class="font-12" style="color:#8F8F8F;font-size: 15px;display: inline-block;"><t t-esc="formatted_date"/></div>
</td>
<td valign="top" style="text-align:right;">
<a t-att-href="top_button_url" target="_blank" style="text-align: center; color: #fff; background-color: #9a5b82; border-radius: 8px; font-size: 15px; padding: 5px 10px; display: inline-block; text-decoration: none; min-width: 65px;">
<span t-esc="top_button_label"/>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table t-if="tips" cellspacing="0" cellpadding="0" align="center" border="0" bgcolor="#eeeeee" style="width:100%; font-family: Arial,Helvetica,Verdana,sans-serif;">
<tr>
<td align="center" valign="top">
<table bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="border: 1px solid #eeeeee; border-bottom: none;width: 100%; max-width: 650px; padding:30px 30px">
<tr>
<td>
<table t-foreach="tips" t-as="tip" cellspacing="0" cellpadding="0" border="0" width="580" align="center" style="width:100%; max-width:580px;">
<tr>
<td valign="top">
<t t-raw="tip"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table t-if="kpi_data" cellspacing="0" cellpadding="0" align="center" border="0" bgcolor="#eeeeee" style="width:100%; font-family: Arial,Helvetica,Verdana,sans-serif;">
<tr>
<td align="center" valign="top">
<table bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="border: 1px solid #eeeeee; border-bottom: none;width: 100%; max-width: 650px; padding:30px 30px">
<tr t-foreach="kpi_data" t-as="kpi_info">
<td t-if="kpi_info.get('kpi_col1') or kpi_info.get('kpi_col2') or kpi_info.get('kpi_col3')">
<table cellspacing="0" cellpadding="0" border="0" width="580" align="center" style="width:100%; max-width:580px;">
<tr>
<td align="left" style="border-bottom: 1px solid #eeeeee;">
<span style="color:#282f33;font-size: 15px; font-weight: bold; line-height: 30px" t-esc="kpi_info['kpi_fullname']"/>
<a t-if="kpi_info['kpi_action']" t-att-href="'/web#action=%s' % kpi_info['kpi_action']"
style="float:right; background-color:#875A7B;margin-left: 5px; padding: 5px 12px 5px 12px; text-decoration: none; color: #ffffff; border-radius: 3px; font-size:13px; font-weight:bold; margin-bottom: 5px;">
View
</a>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" align="center" border="0" style="width:100%; padding: 20px 0;">
<tr valign="top">
<td t-if="kpi_info.get('kpi_col1')" class="mobile-w-33" width="196" style=" text-align: center;">
<t t-call="digest.digest_tool_kpi">
<t t-set="kpi_value" t-value="kpi_info['kpi_col1']['value']"/>
<t t-set="kpi_margin" t-value="kpi_info['kpi_col1'].get('margin')"/>
<t t-set="kpi_subtitle" t-value="kpi_info['kpi_col1']['col_subtitle']"/>
</t>
</td>
<td t-if="kpi_info.get('kpi_col2')" class="mobile-w-33" width="196" style=" text-align: center;">
<t t-call="digest.digest_tool_kpi">
<t t-set="kpi_value" t-value="kpi_info['kpi_col2']['value']"/>
<t t-set="kpi_margin" t-value="kpi_info['kpi_col2'].get('margin')"/>
<t t-set="kpi_subtitle" t-value="kpi_info['kpi_col2']['col_subtitle']"/>
</t>
</td>
<td t-if="kpi_info.get('kpi_col3')" class="mobile-w-33" width="196" style=" text-align: center;">
<t t-call="digest.digest_tool_kpi">
<t t-set="kpi_value" t-value="kpi_info['kpi_col3']['value']"/>
<t t-set="kpi_margin" t-value="kpi_info['kpi_col3'].get('margin')"/>
<t t-set="kpi_subtitle" t-value="kpi_info['kpi_col3']['col_subtitle']"/>
</t>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table t-if="preferences" bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="border-left: 1px solid #eeeeee; border-right: 1px solid #eeeeee; width: 100%; max-width: 650px; padding:30px 30px">
<tr>
<td bgcolor="#fafafa" width="100%" style="padding-top: 20px; padding-bottom: 20px;" align="center">
<p t-foreach="preferences" t-as="preference" class="font-12" style="font-size: 15px; color: #6b6d70">
<t t-raw="preference"/>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<t t-if="body" t-raw="body"/>
<table t-if="display_mobile_banner" cellspacing="0" cellpadding="0" align="center" border="0" bgcolor="#eeeeee" style="width:100%; font-family: Arial,Helvetica,Verdana,sans-serif;">
<tr>
<td align="center" valign="top">
<table bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="border: 1px solid #eeeeee; width: 100%; max-width: 650px; padding:30px 30px">
<tr valign="top">
<td>
<t t-call="digest.digest_section_mobile"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" align="center" border="0" bgcolor="#eeeeee" style="width:100%; font-family: Arial,Helvetica,Verdana,sans-serif;">
<tr>
<td align="center" valign="top">
<table bgcolor="#eeeeee" cellspacing="0" cellpadding="0" width="650" align="center" border="0" style="margin-top:30px;font-size: 15px; text-align:center; width: 100%; max-width: 650px;">
<tr>
<td style="color:#8F8F8F;font-weight:bold;font-size: 20px; line-height: 30px;" t-esc="company.name"/>
</tr>
<tr>
<td style="color:#8F8F8F;font-size: 12px; line-height: 30px;">Powered by <a href="https://www.odoo.com" target="_blank" style="color:#875A7B">Odoo</a>.</td>
</tr>
<tr>
<td height="30"> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</template>
<!-- DIGEST PARTS -->
<!-- MOBILE BANNER -->
<template id="digest_section_mobile">
<table cellspacing="0" cellpadding="0" border="0" width="580" align="center" style="width:100%; max-width:580px;">
<tr>
<td valign="top" width="168">
<img src="https://www.odoo.com/web/image/24717933/odoo-mobile.png" alt="Odoo Mobile" width="168"/>
</td>
<td valign="top">
<p class="font-16" style="color:#2d2a26;font-size: 18px;line-height: 23px; margin-top: 20px">Run your business from anywhere with <br class="mobile-hide" /><b>Odoo Mobile</b>.</p>
<a href="https://play.google.com/store/apps/details?id=com.odoo.mobile" target="_blank"><img src="https://www.odoo.com/digest/static/src/img/google_play.png" style="display:inline-block;height: 40px; margin-bottom: 5px"/></a>
<span class="mobile-hide"> </span>
<a href="https://itunes.apple.com/us/app/odoo/id1272543640" target="_blank"><img src="https://www.odoo.com/digest/static/src/img/app_store.png" style="display:inline-block;height: 40px; margin-bottom: 5px"/></a>
</td>
</tr>
</table>
</template>
<!-- DIGEST TOOLS -->
<!-- KPI DISPLAY -->
<template id="digest_tool_kpi">
<span class="font-25" style="color:#282f33;font-size: 35px; font-weight: bold; text-decoration: none; line-height: 36px;">
<t t-esc="kpi_value"/>
</span><br/>
<span style="color:#888888;display: inline-block; font-size: 12px; line-height: 18px; text-transform: uppercase;">
<t t-esc="kpi_subtitle"/>
</span>
<t t-if="kpi_margin">
<t t-if="kpi_margin &gt; 0.0">
<div style="background-color:#d5f1e2; border: 1px solid #c4ecd7; margin: 10px auto;width: 67px; line-height:27px; text-decoration: none; color: #17613a; border-radius: 5px; font-size:13px;">
▲ <t t-esc="'%.2f' % kpi_margin"/>
</div>
</t>
<t t-elif="kpi_margin &lt; 0.0">
<div style="background-color:#f7dddc; border: 1px solid #f4cfce; margin: 10px auto;width: 67px; line-height:27px; text-decoration: none; color: #712b29; border-radius: 5px; font-size:13px;">
▼ <t t-esc="'%.2f' % kpi_margin"/>
</div>
</t>
</t>
</template>
</data></odoo>