summaryrefslogtreecommitdiff
path: root/addons/mail/data/mail_data.xml
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-12-07 12:20:08 +0000
committerNicolas Martinelli <nim@odoo.com>2018-12-10 11:59:03 +0000
commit0687f17622c3e93558a80364ff4b07fa1ed76d8e (patch)
treeb577e290fac7901c0e39d60e03a9f2a57fc09cb0 /addons/mail/data/mail_data.xml
parentfba844c73268cace5055537449e7b8f1e530c22c (diff)
[FIX] mail: model description
Do not use the model `_description` field which cannot be translated. Use the `display_name` of the corresponding model instead. Moreover, `<t t-esc="'%s' % model_description or 'document'"/>` gives `'None'`, while `'document'` is expected. This adds a query to some tests, which is expected since `display_name` requires information stored in the DB, while `_description` is defined at the Python level. opw-1908420
Diffstat (limited to 'addons/mail/data/mail_data.xml')
-rw-r--r--addons/mail/data/mail_data.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index ed26830a36a..0b97f5cceff 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -169,7 +169,7 @@
<td align="center" style="min-width: 590px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: white; padding: 0; border-collapse:separate;">
<tr><td valign="middle">
- <span style="font-size: 10px;">Your <t t-esc="'%s' % model_description or 'document'"/></span><br/>
+ <span style="font-size: 10px;">Your <t t-esc="model_description or 'document'"/></span><br/>
<span style="font-size: 20px; font-weight: bold;">
<t t-esc="message.record_name and message.record_name.replace('/','-') or ''"/>
</span>
@@ -233,11 +233,11 @@
<t t-set="is_online" t-value="access_action and access_action['type'] == 'ir.actions.act_url'"/>
<t t-set="access_url" t-value="is_online and record._get_share_url(redirect=True, signup_partner=True) or ''"/>
<t t-set="access_name">
- View <t t-esc="record._description.lower()"/>
+ View <t t-esc="model_description or 'document'"/>
</t>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: white; padding: 0; border-collapse:separate;">
<tr><td valign="middle">
- <span style="font-size: 10px;">Your <t t-esc="'%s' % model_description or 'document'"/></span><br/>
+ <span style="font-size: 10px;">Your <t t-esc="model_description or 'document'"/></span><br/>
<span style="font-size: 20px; font-weight: bold;">
<t t-esc="message.record_name"/>
</span>
@@ -301,11 +301,11 @@
<template id="message_user_assigned">
<p style="margin: 0px;">
<span>Dear <t t-esc="object.user_id.sudo().name"/>,</span><br />
- <span style="margin-top: 8px;">You have been assigned to the <t t-esc="object._description.lower()"/> <t t-esc="object.name_get()[0][1]"/>.</span>
+ <span style="margin-top: 8px;">You have been assigned to the <t t-esc="model_description or 'document'"/> <t t-esc="object.name_get()[0][1]"/>.</span>
</p>
<p style="margin-top: 24px; margin-bottom: 16px;">
<a t-att-href="'/mail/view?model=%s&amp;res_id=%s' % (object._name, object.id)" style="background-color:#875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px;">
- View <t t-esc="object._description.lower()"/>
+ View <t t-esc="model_description or 'document'"/>
</a>
</p>
</template>