summaryrefslogtreecommitdiff
path: root/addons/mail/data
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2018-10-01 14:59:41 +0200
committerXavierDo <xdo@odoo.com>2018-10-02 13:07:02 +0200
commit775e8a9f2de3370e9947a612097ead65afd3b7ed (patch)
tree7402ad9dd3663fdef0c4e5f79754392a9b127d42 /addons/mail/data
parent64d7da419885301fa2c1b26bf3cde286052cefba (diff)
[FIX] mail: make guideline template a qweb view
The mail template mail_template_channel_send_guidelines should only be used from send_guidelines action. Anyway, with mail_template on activity and all demo done to show this mechanic on contacts, trying to render this one will generate a traceback. This fix transforms the mail_template to qweb view so that it won't be available in mail template.
Diffstat (limited to 'addons/mail/data')
-rw-r--r--addons/mail/data/mail_data.xml18
1 files changed, 5 insertions, 13 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index 2f2d36f62f2..a664838b5a9 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -364,23 +364,15 @@
</div>
</template>
- <record id="mail_template_channel_send_guidelines" model="mail.template">
- <field name="name">Partner: Send channel guidelines</field>
- <field name="model_id" ref="base.model_res_partner"/>
- <field name="email_from">${object.company_id.catchall or object.company_id.email|safe}</field>
- <field name="partner_to">${object.id}</field>
- <field name="subject">Guidelines of channel ${ctx['channel'].name}</field>
- <field name="body_html" type="xml">
+ <template id="mail_channel_send_guidelines">
<div>
-<p>Hello ${object.name or ''},</p>
-<p>Please find below the guidelines of the ${ctx['channel'].name} channel.</p>
+<p>Hello <t t-esc="partner.name"/>,</p>
+<p>Please find below the guidelines of the <t t-esc="channel.name"/> channel.</p>
<p>
-${ctx['channel'].moderation_guidelines_msg}
+<t t-esc="channel.moderation_guidelines_msg"/>
</p>
<p></p>
</div>
-</field>
- <field name="user_signature" eval="False"/>
- </record>
+ </template>
</data>
</odoo>