[IMP] purchase: RfQ email layout improved

This commit is contained in:
Fabien Pinckaers
2016-12-22 17:30:34 +01:00
parent a86babf447
commit 752e4f566b
2 changed files with 85 additions and 0 deletions
@@ -77,5 +77,89 @@ from ${object.company_id.name}.
]]></field>
</record>
<!--Default Notification Email template for invoices-->
<record id="purchase.mail_template_data_notification_email_purchase_order" model="mail.template">
<field name="name">Purchase Order Notification Email</field>
<field name="subject">${object.subject}</field>
<field name="model_id" ref="mail.model_mail_message"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[<html>
<head></head>
<body style="margin: 0; padding: 0;">
<table border="0" width="100%" cellpadding="0" bgcolor="#ededed" style="padding: 20px; background-color: #ededed" 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;">
<tr>
<td valign="middle">
<span style="font-size:20px; color:white; font-weight: bold;">
${object.record_name}
</span>
</td>
<td valign="middle" align="right">
<img src="/logo.png" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.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;">
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
${object.body | safe}
</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;">
<tr>
<td valign="middle" align="left" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">
${user.company_id.name}<br/>
${user.company_id.phone or ''}
</td>
<td valign="middle" align="right" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">
% if user.company_id.email:
<a href="mailto:${user.company_id.email}" style="text-decoration:none; color: white;">${user.company_id.email}</a><br/>
% endif
% if user.company_id.website:
<a href="${user.company_id.website}" style="text-decoration:none; color: white;">
${user.company_id.website}
</a>
% endif
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
Powered by <a href="https://www.odoo.com">Odoo</a>.
</td>
</tr>
</tbody>
</table>
</body>
</html>
]]></field>
</record>
</data>
</odoo>
+1
View File
@@ -289,6 +289,7 @@ class PurchaseOrder(models.Model):
'default_use_template': bool(template_id),
'default_template_id': template_id,
'default_composition_mode': 'comment',
'custom_layout': "purchase.mail_template_data_notification_email_purchase_order"
})
return {
'name': _('Compose Email'),