summaryrefslogtreecommitdiff
path: root/addons/digest/data/digest_data.xml
diff options
context:
space:
mode:
authorMitali Patel <mpa@odoo.com>2018-05-16 11:43:07 +0530
committerThibault Delavallée <tde@odoo.com>2018-07-19 11:26:45 +0200
commit2d1abe64e433acdf95d58fedc736247829dc748c (patch)
treeb3c97fa785c35f9254c2565755b732d5f5ed5023 /addons/digest/data/digest_data.xml
parentca9aa5f2864f4ec83fe918b00686d6584d89c289 (diff)
[ADD] digest: add new module to send recurrent digests by email
This commit adds a new digest module allowing to send recurrent digests by email. Those contain a summary of the activity and display various KPIs allowing to see the activity at a glance. It is also a great tool to improve user engagement. Digest module contain the core implementation of digests emails as well as first basic KPIs. Future commits will gradually add KPIs in various main addons. Digests consist in email templates that have to call some methods on digest module (compute_kpis, compute_tips, compute_kpis_actions) and render it accordingly. A default digest is given in data allowing to tune it or to duplicate and modify it. Frequency is configurable on the digest; digests can be weekly, monthly or send every 3 months. New employee users are added to the default widget. KPIs are computed for each subscribed users so that results match its groups and related access rights. Default digest therefore work for all users as displayed results depend on their right without having to define separate digests just for that purpose. Implementation is done with Studio in mind. KPIs are computed fields on the digest model. It means using Studio custom computed fields can be defined to add customization to the digests, using fields named x_kpi_... . Digests also holds tips to remind and warn users of features to activate or configure like mailgateway. KPIs can be linked to actions so that the section contain a link allowing to directly jump on a given menu, allowing to directly link reporting menus for example. This commit is related Task ID 30655 and PR #18318. Co-authored-by: Siddharth Gajjar <sga@odoo.com>
Diffstat (limited to 'addons/digest/data/digest_data.xml')
-rw-r--r--addons/digest/data/digest_data.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/addons/digest/data/digest_data.xml b/addons/digest/data/digest_data.xml
new file mode 100644
index 00000000000..42607cd3401
--- /dev/null
+++ b/addons/digest/data/digest_data.xml
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='utf-8'?>
+<odoo>
+ <data noupdate="1">
+ <record id="digest_digest_default" model="digest.digest">
+ <field name="name">Weekly Digest</field>
+ <field name="user_ids" eval="[(4, ref('base.user_root'))]"/>
+ <field name="next_run_date" eval="(DateTime.now() + timedelta(days=7)).strftime('%Y-%m-%d')"/>
+ <field name="kpi_res_users_connected">True</field>
+ <field name="kpi_mail_message_total">True</field>
+ </record>
+ </data>
+
+ <data>
+ <record id="digest_tip_mail_0" model="digest.tip">
+ <field name="sequence">1</field>
+ <field name="tip_description" type="html">
+<div>
+ % set users = object.env['res.users'].search([], limit=10, order='id desc')
+ % set channel_id = object.env.ref('mail.channel_all_employees').id
+ <strong style="font-size: 16px;">Did you know...?</strong>
+ <div style="font-size: 14px;">You can ping colleagues by tagging them in your messages using "@". They will be instantly notified.<br/>
+ <div>
+ <center>
+ <img src="/digest/static/src/img/notification.png" width="70%" height="100%"/><br/>
+ </center>
+ ${', '.join(users.mapped('name'))} signed up. Say hello in the <a href="/web#action=mail.mail_channel_action_client_chat&amp;active_id=${channel_id}" style="color: #006d6b;">company's discussion channel.</a>
+ </div>
+ </div>
+</div>
+ </field>
+ </record>
+ <record id="digest_tip_mail_1" model="digest.tip">
+ <field name="sequence">7</field>
+ <field name="tip_description" type="html">
+<div>
+ <strong style="font-size: 16px;">Get things done with activities</strong>
+ <div style="font-size: 14px;">You don't have any activity scheduled. Use activities on any business document to schedule meetings, calls and todos.</div>
+ <center>
+ <img src="/digest/static/src/img/activity.png" width="70%" height="100%"/><br/>
+ </center>
+</div>
+ </field>
+ </record>
+ </data>
+</odoo>