PURPOSE
Make digest email and tips more appealing. The goals of these tips are
* to encourage the adoption of other apps (Did you know ?);
* to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
* to show social proof and increase trust (emphasis on already existing
projects / customers to);
SPECIFICATIONS
Add a daily digest option, allowing to send digests on a daily basis. It
will be the default settings to help users coming back to odoo.
Add a slowdown heuristics. If not any user targeted by a daily digest logs
himself within 3 days, digest is slowed down to a weekly setting to avoid
spam.
Add a preference section in template, to hold notably links to some
configuration steps sent mainly for admin / CEOs.
Improve access on models.
LINKS
Task ID 2197417
PR odoo/odoo#51619
69 lines
2.5 KiB
XML
69 lines
2.5 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">
|
|
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="message.body"/>
|
|
</body>
|
|
</html>
|
|
</template>
|
|
|
|
<!-- DIGEST PART: PREFERENCES -->
|
|
<template id="digest_section_preferences">
|
|
<p t-if="object._context.get('digest_slowdown')" class="font-12" style="font-size: 15px; color: #6b6d70">
|
|
We've noticed you did not connect these last few days so we've automatically switched your preference to weekly Digests.
|
|
</p>
|
|
<p t-elif="user.has_group('base.group_erp_manager') and object.periodicity == 'daily'" class="font-12" style="font-size: 15px; color: #6b6d70">
|
|
Prefer a broader overview ?
|
|
<a t-att-href="'/digest/%s/set_periodicity?periodicity=weekly' % object.id" target="_blank" style="color:#875A7B; font-weight: bold;">Switch to weekly Digests.</a>
|
|
</p>
|
|
<p t-else=""/>
|
|
</template>
|
|
</data></odoo>
|