summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-01-12 17:11:29 +0100
committerThibault Delavallée <tde@odoo.com>2018-01-29 16:54:18 +0100
commit2f6a661fe9bbd1aef29b8dfb9a46ded009a715ff (patch)
treee306ea1c7ebd2fc7c91fe538219b3c4b78e8b858
parent0f301bec25dd6d76fd6ac23275a82e0a32886bbc (diff)
[REF] mail: add a secondary notification template in mail
Various modules use another template when sending notification emails for some specific case. For example sending sale orders or invoices using the 'Send by email' button encapsulates the content in a layout different from the base one. As all modules basically uses the same copy-and-pasted template we choose to define another email template directly in mail.
-rw-r--r--addons/mail/data/mail_data.xml58
1 files changed, 58 insertions, 0 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index 998a482de60..a6c9b62e019 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -124,5 +124,63 @@
</p>
</div>
</template>
+
+ <template id="mail_notification_borders">
+<div>
+<table border="0" width="100%" cellpadding="0" bgcolor="#ededed" style="padding: 20px; background-color: #ededed; border-collapse:separate;" summary="o_mail_notification">
+<tbody>
+ <!-- HEADER -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="590" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px; border-collapse:separate;">
+ <tr><td valign="middle">
+ <span style="font-size:20px; color:white; font-weight: bold;">
+ <t t-esc="message.record_name"/>
+ </span>
+ </td><td valign="middle" align="right">
+ <img t-att-src="'/logo.png?company=%s' % company.id" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="'%s' % company.name"/>
+ </td></tr>
+ </table>
+ </td>
+ </tr>
+ <!-- CONTENT -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="590" border="0" cellpadding="0" bgcolor="#ffffff" style="min-width: 590px; background-color: rgb(255, 255, 255); padding: 20px; border-collapse:separate;">
+ <tbody><td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
+ <t t-raw="message.body"/>
+ </td></tbody>
+ </table>
+ </td>
+ </tr>
+ <!-- FOOTER -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="590" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px; border-collapse:separate;">
+ <tr><td valign="middle" align="left" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">
+ <t t-esc="company.name"/><br/>
+ <t t-esc="company.phone"/>
+ </td><td valign="middle" align="right" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">
+ <t t-if="company.email">
+ <a t-att-href="'mailto:%s' % company.email" style="text-decoration:none; color: white;"><t t-esc="company.email"/></a><br/>
+ </t>
+ <t t-if="company.website">
+ <a t-att-href="'%s' % company.website" style="text-decoration:none; color: white;">
+ <t t-esc="company.website"/>
+ </a>
+ </t>
+ </td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ Powered by <a target="_blank" href="https://www.odoo.com">Odoo</a>.
+ </td>
+ </tr>
+</tbody>
+</table>
+</div>
+ </template>
</data>
</odoo>