summaryrefslogtreecommitdiff
path: root/addons/mail/data/mail_data.xml
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2016-03-01 15:39:49 +0100
committerChristophe Matthieu <chm@odoo.com>2016-03-03 15:41:02 +0100
commit1320ad8cfebf39ce15eef43d597d9bc2ff3008a5 (patch)
tree13ff5b3f986423f08ab0f529d3d0785b90e72bb7 /addons/mail/data/mail_data.xml
parent7952a57b4569fc8a54442f43b012f3c2d1052655 (diff)
[FIX] mail: button_access is undefined in mail template preview
opw-668409
Diffstat (limited to 'addons/mail/data/mail_data.xml')
-rw-r--r--addons/mail/data/mail_data.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index f15304af976..07588e4a82b 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -62,8 +62,10 @@
<field name="body_html"><![CDATA[
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
+ % if ctx.get('button_access'):
<link itemprop="target" href="${ctx['button_access']['url']}"/>
<link itemprop="url" href="${ctx['button_access']['url']}"/>
+ % endif
<meta itemprop="name" content="View ${ctx['model_name']}"/>
</div>
</div>