diff options
| author | Julien (juc) Castiaux <juc@odoo.com> | 2019-02-18 12:49:22 +0000 |
|---|---|---|
| committer | Julien (juc) Castiaux <juc@odoo.com> | 2019-02-18 14:42:32 +0000 |
| commit | 6b7f1ef0914344b68de974fe7f4488b7ecc11f06 (patch) | |
| tree | b6bd9bc00bb5ee285cf9b13b3607da90901da7e6 /addons/digest/data | |
| parent | c0847a7bd75d31671b397ad5a93fe81a510a6d48 (diff) | |
[FIX] digest: remove unnecessary context
The `company` context is explicitly set by `action_send` while the
template previewer doesn't set it. This inconsistency leads to
error when previewing the digest template.
opw-1939007
closes odoo/odoo#31195
Diffstat (limited to 'addons/digest/data')
| -rw-r--r-- | addons/digest/data/digest_template_data.xml | 5 |
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&model=digest.digest&id=${object.id}" target="_blank" style="color: #875A7B;">Choose the metrics you care about</a> |
