PURPOSE Settings allow to change colors used in emails (primary and secondary colors). Those are used for headers and buttons. They are currently shared with colors used for base documents and reports layout: changing email colors change documents colors, which is not expected nor clearly indicated. SPECIFICATIONS Split configuration: colors used in documents may differ from colors used in emails. Duplicate color fields (primary and secondary). To ease setup when updating documents colors, update mail colors accordingly. Inverse is not true as we consider documents being the main configuration, and emails a more fine-grain configuration. Task-3346388 Part-of: odoo/odoo#123678
517 lines
23 KiB
XML
517 lines
23 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">
|
|
<!DOCTYPE html>
|
|
<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">
|
|
<t t-set="color_company" t-value="company.email_secondary_color or '#875a7b'"/>
|
|
/* Remove space around the email design. */
|
|
html,
|
|
body {
|
|
margin: 0 auto !important;
|
|
padding: 0 !important;
|
|
height: 100% !important;
|
|
width: 100% !important;
|
|
font-family: Arial, Helvetica, Verdana, sans-serif;
|
|
}
|
|
/* Prevent Windows 10 Mail from underlining links. Styles for underlined links should be inline. */
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
#header_background {
|
|
background-color: <t t-out="color_company"/>;
|
|
padding-top:70px;
|
|
}
|
|
#header {
|
|
border-start: 1px solid <t t-out="color_company"/>;
|
|
border-end: 1px solid <t t-out="color_company"/>;
|
|
}
|
|
.global_layout {
|
|
width: 588px;
|
|
margin: 0 auto;
|
|
background-color: #ffffff;
|
|
}
|
|
.company_name {
|
|
display: inline;
|
|
vertical-align: middle;
|
|
font-weight: bold;
|
|
color: #8f8f8f;
|
|
font-size: 25px;
|
|
}
|
|
.header_title {
|
|
font-weight: bold;
|
|
color: #282f33;
|
|
word-break: break-all;
|
|
}
|
|
.button {
|
|
color: #ffffff;
|
|
}
|
|
.td_button {
|
|
background-color: <t t-out="color_company"/>;
|
|
border-radius: 5px;
|
|
white-space: nowrap;
|
|
}
|
|
#button_connect {
|
|
font-size: 15px;
|
|
}
|
|
.header_date {
|
|
color: #8f8f8f;
|
|
font-size: 12px;
|
|
}
|
|
.tip_title {
|
|
margin-top: 0;
|
|
font-weight: bold;
|
|
font-size: 20px;
|
|
}
|
|
.tip_content {
|
|
margin: 0 auto;
|
|
color: #333333;
|
|
text-align: justify;
|
|
text-justify: inter-word;
|
|
margin: 15px auto 0 auto;
|
|
font-size: 15px;
|
|
line-height: 25px;
|
|
}
|
|
.tip_button {
|
|
background-color: <t t-out="color_company"/>;
|
|
border-radius: 5px;
|
|
padding: 10px;
|
|
text-decoration: none;
|
|
}
|
|
.tip_button_text {
|
|
color: #ffffff;
|
|
}
|
|
.illustration_border {
|
|
width: 100%;
|
|
border: 1px solid #808080;
|
|
margin-top: 20px;
|
|
}
|
|
.kpi_row_footer {
|
|
padding-bottom: 20px;
|
|
}
|
|
.kpi_header {
|
|
font-size: 15px;
|
|
font-weight: bold;
|
|
color: #282f33;
|
|
}
|
|
#button_open_report {
|
|
font-size: 12px;
|
|
font-weight: normal;
|
|
}
|
|
.kpi_cell {
|
|
width: 33%;
|
|
text-align: center;
|
|
padding-top: 2px;
|
|
padding: 0;
|
|
}
|
|
.kpi_value {
|
|
color: #282f33;
|
|
font-weight: bold;
|
|
text-decoration: none;
|
|
font-size: 30px;
|
|
}
|
|
.kpi_border_col {
|
|
color: #00A09D;
|
|
}
|
|
.kpi_value_label {
|
|
display: inline-block;
|
|
margin-bottom: 10px;
|
|
color: #888888;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
}
|
|
.kpi_margin_margin {
|
|
margin-bottom: 10px;
|
|
}
|
|
.download_app {
|
|
margin-bottom: 5px;
|
|
display: inline-block;
|
|
}
|
|
.preference {
|
|
margin-bottom: 15px;
|
|
color: #6b6d70;
|
|
font-size: 15px;
|
|
}
|
|
.by_odoo {
|
|
color: #8f8f8f;
|
|
font-size: 12px;
|
|
}
|
|
.odoo_link_text {
|
|
font-weight: bold;
|
|
color: <t t-out="color_company"/>;
|
|
}
|
|
.run_business {
|
|
color: #2d2a26;
|
|
margin: 15px auto;
|
|
font-size: 18px;
|
|
}
|
|
#footer {
|
|
background-color: #eeeeee;
|
|
color: #8f8f8f;
|
|
text-align: center;
|
|
font-size: 20px;
|
|
border: 1px solid #eeeeee;
|
|
border-top: 0;
|
|
}
|
|
#stock_tip {
|
|
overflow: auto;
|
|
margin-top: 20px;
|
|
}
|
|
#stock_div_img {
|
|
text-align: center;
|
|
}
|
|
#stock_img {
|
|
width: 70%;
|
|
}
|
|
@media only screen and (max-width: 650px) {
|
|
.global_layout {
|
|
width: 100% !important;
|
|
}
|
|
.d-block {
|
|
display: block !important;
|
|
}
|
|
#header_background {
|
|
padding-top: 0px;
|
|
}
|
|
#header {
|
|
padding: 15px 20px;
|
|
border: 1px solid #eeeeee;
|
|
}
|
|
.company_name {
|
|
font-size: 15px;
|
|
}
|
|
.header_title {
|
|
margin: 5px auto;
|
|
}
|
|
.td_button_connect {
|
|
padding: 0px 8px !important;
|
|
height: 22px !important;
|
|
font-size: 12px;
|
|
}
|
|
.td_button_open_report {
|
|
padding: 0px 10px !important;
|
|
font-size: 12px;
|
|
}
|
|
#button_connect {
|
|
font-size: 12px;
|
|
}
|
|
.header_date {
|
|
margin-top: 10px;
|
|
font-size: 10px;
|
|
}
|
|
.tip_title {
|
|
font-size: 14px;
|
|
}
|
|
.tip_content {
|
|
margin: 10px auto 0 auto;
|
|
font-size: 12px;
|
|
line-height: 20px;
|
|
}
|
|
.illustration_border {
|
|
margin-top: 15px;
|
|
}
|
|
.kpi_value {
|
|
font-size: 20px;
|
|
}
|
|
.kpi_margin {
|
|
font-size: 10px !important;
|
|
}
|
|
.kpi_margin_margin {
|
|
margin-bottom: 5px;
|
|
}
|
|
.preference {
|
|
font-size: 12px;
|
|
}
|
|
.by_odoo {
|
|
font-size: 10px;
|
|
}
|
|
.run_business {
|
|
margin: 20px auto;
|
|
font-size: 12px;
|
|
}
|
|
#footer {
|
|
font-size: 15px;
|
|
}
|
|
#powered {
|
|
margin-top: 15px;
|
|
}
|
|
.tip_twocol {
|
|
overflow: auto;
|
|
margin-top: 15px;
|
|
}
|
|
.tip_twocol_left {
|
|
text-align: left;
|
|
}
|
|
.tip_twocol_img {
|
|
width: 90%;
|
|
}
|
|
.global_td {
|
|
padding: 20px;
|
|
}
|
|
.p0 {
|
|
padding: 0 !important;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<t t-out="body"/>
|
|
</body>
|
|
</html>
|
|
</template>
|
|
|
|
<!-- DIGEST MAIN TEMPLATE -->
|
|
<template id="digest_mail_main">
|
|
<table cellspacing="0" cellpadding="0" style="width: 100%;border: 1px solid #eeeeee;border-bottom: 0;" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<td id="header_background" align="center">
|
|
<table cellspacing="0" cellpadding="0" border="0" id="header" class="global_layout">
|
|
<tbody>
|
|
<tr>
|
|
<td style="padding: 20px 20px 0px 20px;" class="p0"><p t-field="company.name" class="company_name" /></td>
|
|
<td align="right" style="padding: 20px 20px 0px 0px;" class="p0">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td class="td_button td_button_connect" style="height: 29px;padding: 3px 10px;">
|
|
<a t-att-href="top_button_url" target="_blank">
|
|
<span t-esc="top_button_label" class="button" id="button_connect" />
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding-left: 20px" class="p0" colspan="2">
|
|
<div class="header_title">
|
|
<p t-esc="title"/>
|
|
<p t-if="sub_title" t-esc="sub_title"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 0px 0px 20px 20px;" class="p0" colspan="2">
|
|
<span t-esc="formatted_date" class="header_date"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;background-color: #eeeeee;">
|
|
<tbody>
|
|
<tr>
|
|
<td align="center">
|
|
<table cellspacing="0" cellpadding="0" border="0" class="global_layout">
|
|
<tbody>
|
|
<tr t-if="tips" t-foreach="tips" t-as="tip">
|
|
<td colspan="3" style="width: 100%;padding: 20px;border: 1px solid #eeeeee;">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td t-out="tip"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr t-if="kpi_data">
|
|
<td style="padding: 20px 20px 0px 20px;" class='global_td'>
|
|
<table t-foreach="kpi_data" t-as="kpi_info" style="width: 100%;" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td style="padding-bottom: 20px;">
|
|
<table t-if="kpi_info.get('kpi_col1') or kpi_info.get('kpi_col2') or kpi_info.get('kpi_col3')"
|
|
t-att-data-field="kpi_info['kpi_name']" cellspacing="0" cellpadding="10" style="width: 100%;margin-bottom: 5px;">
|
|
<tr class="kpi_header">
|
|
<td colspan="2" style="padding: 0px 0px 10px 0px;">
|
|
<span t-esc="kpi_info['kpi_fullname']" />
|
|
</td>
|
|
<td t-if="kpi_info['kpi_action']" align="right" style="padding: 0px 0px 10px 0px;">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td class="td_button td_button_open_report" style="padding: 1px 10px;height: 24px;">
|
|
<a t-att-href="'/web#action=%s' % kpi_info['kpi_action']">
|
|
<span class="button" id="button_open_report">Open Report</span>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr style="vertical-align: top;">
|
|
<td t-if="kpi_info.get('kpi_col1')" class="kpi_cell" style="border-top: 2px solid #00A09D;">
|
|
<div 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']" />
|
|
</div>
|
|
</td>
|
|
<td t-if="kpi_info.get('kpi_col2')" class="kpi_cell" t-att-style="'border-top: 2px solid ' + (company.email_secondary_color or '#875a7b')">
|
|
<div 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']" />
|
|
</div>
|
|
</td>
|
|
<td t-if="kpi_info.get('kpi_col3')" class="kpi_cell" style="border-top: 2px solid #00A09D;">
|
|
<div 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']" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr t-if="body" >
|
|
<td style="padding: 20px 20px 0px 20px;" class='global_td'><t t-out="body" /></td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td style="padding: 20px;border: 1px solid #eeeeee;">
|
|
<table border="0" width="100%">
|
|
<tbody>
|
|
<tr style="background-color: #eeeeee;">
|
|
<td align="center" colspan="3" valign="center" style="padding: 15px;">
|
|
<div t-if="preferences" t-foreach="preferences" t-as="preference" class="preference">
|
|
<t t-out="preference" />
|
|
</div>
|
|
<div class="by_odoo" style="margin-bottom: 15px;">
|
|
Sent by <a href="https://www.odoo.com" target="_blank">
|
|
<span class="odoo_link_text">Odoo</span></a>
|
|
<t t-if="unsubscribe_token">
|
|
–
|
|
<a t-attf-href="/digest/#{object.id}/unsubscribe?token=#{unsubscribe_token}&user_id=#{user.id}" target="_blank"
|
|
style="text-decoration: none;">
|
|
<span style="color: #8f8f8f;">Unsubscribe</span>
|
|
</a>
|
|
</t>
|
|
<t t-elif="object and object._name == 'digest.digest'">
|
|
–
|
|
<a t-att-href="'/web#view_type=form&model=digest.digest&id=%s' % object.id" target="_blank"
|
|
style="text-decoration: none;">
|
|
<span style="color: #8f8f8f;">Unsubscribe</span>
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr t-if="display_mobile_banner" t-call="digest.digest_section_mobile" />
|
|
</tfoot>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td align="center" style="padding: 20px 0px 0px 0px;">
|
|
<table align="center">
|
|
<tbody>
|
|
<tr>
|
|
<div id="footer">
|
|
<p style="font-weight: bold;" t-esc="company.name" />
|
|
<p class="by_odoo" id="powered">
|
|
Powered by <a href="https://www.odoo.com" target="_blank" class="odoo_link">
|
|
<span class="odoo_link_text">Odoo</span></a>
|
|
</p>
|
|
</div>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</template>
|
|
|
|
<!-- DIGEST PARTS -->
|
|
|
|
<!-- MOBILE BANNER -->
|
|
<template id="digest_section_mobile">
|
|
<td colspan="3" style="padding: 20px;width:100%">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td align="right" style="width: 50%;">
|
|
<img src="https://www.odoo.com/web/image/24717933/odoo-mobile.png" alt="Odoo Mobile" />
|
|
</td>
|
|
<td align="left" style="width: 50%;">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p class="run_business">Run your business from anywhere with <b>Odoo Mobile</b>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="https://play.google.com/store/apps/details?id=com.odoo.mobile"
|
|
target="_blank">
|
|
<img class="download_app" height="40" width="135"
|
|
src="https://download.odoocdn.com/digests/digest/static/src/img/google_play.png" />
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="https://itunes.apple.com/us/app/odoo/id1272543640" target="_blank">
|
|
<img class="download_app" height="40" width="135"
|
|
src="https://download.odoocdn.com/digests/digest/static/src/img/app_store.png" />
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</template>
|
|
|
|
|
|
<!-- DIGEST TOOLS -->
|
|
|
|
<!-- KPI DISPLAY -->
|
|
<template id="digest_tool_kpi">
|
|
<span t-esc="kpi_value" style="color: #00A09D;font-weight: bold;text-decoration: none;" class="kpi_value kpi_border_col" />
|
|
<br/>
|
|
<span t-esc="kpi_subtitle" class="kpi_value_label" />
|
|
<table t-if="kpi_margin" class="kpi_margin_margin" align="center" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td t-if="kpi_margin > 0.0" class="kpi_margin positive_kpi_margin" style="padding: 5px 10px;font-size: 12px;text-decoration: none;border-radius: 5px;border: 1px solid #c4ecd7;border-radius: 5px; background-color: #c4ecd7;color: #17613a;">
|
|
▲ <t t-esc="'%.2f' % kpi_margin" /> %
|
|
</td>
|
|
<td t-elif="kpi_margin < 0.0" class="kpi_margin negative_kpi_margin" style="padding: 5px 10px;font-size: 12px;text-decoration: none;border-radius: 5px;border: 1px solid #f4cfce;background-color: #f7dddc;color: #712b29;">
|
|
▼ <t t-esc="'%.2f' % kpi_margin" /> %
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</template>
|
|
|
|
</data>
|
|
</odoo>
|