summaryrefslogtreecommitdiff
path: root/addons/digest/data/digest_template_data.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/digest/data/digest_template_data.xml')
-rw-r--r--addons/digest/data/digest_template_data.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/digest/data/digest_template_data.xml b/addons/digest/data/digest_template_data.xml
index f405892e692..e3053b661d1 100644
--- a/addons/digest/data/digest_template_data.xml
+++ b/addons/digest/data/digest_template_data.xml
@@ -10,7 +10,8 @@
<table style="width: 100%; border-spacing: 0; font-family: Helvetica,Arial,Verdana,sans-serif;">
<tr>
<td align="center" valign="top" style="border-collapse: collapse; padding: 0">
- % set company, user = ctx['company'], ctx['user']
+ % set user = ctx.get('user', user)
+ % set company = user.company_id
% set data = object.compute_kpis(company, user)
% set tips = object.compute_tips(company, user)
% set kpi_actions = object.compute_kpis_actions(company, user)
@@ -136,7 +137,7 @@
<table style="margin-top: 5px; border: 1px solid #e7e7e7; font-size: 15px; width: 100%; max-width: 600px;">
<tr>
<td style="border-collapse: collapse; margin: 0; padding: 10px 20px;">
- % if ctx['user'].has_group('base.group_system'):
+ % if user.has_group('base.group_system'):
<div style="margin-top: 20px;">
Want to customize the email?
<a href="/web#view_type=form&amp;model=digest.digest&amp;id=${object.id}" target="_blank" style="color: #875A7B;">Choose the metrics you care about</a>