summaryrefslogtreecommitdiff
path: root/addons/purchase/data/mail_template_data.xml
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2018-04-20 13:18:55 +0200
committerNicolas Lempereur <nle@odoo.com>2018-04-23 15:31:52 +0200
commitdd18811e6c467785eedc4f171619e4fe3a444e62 (patch)
tree9269bd1b3248c6d5444c642e09310662951b1df7 /addons/purchase/data/mail_template_data.xml
parent2bc3fd89f2207c3caa7e6e51ad7004ef5325ece2 (diff)
[FIX] purchase: use PO company for PO notification
In 41ffb503 the "Invoice Notification Email" and "Sale Order Notification Email" were modified so the company used was the one of the object if available or the sender otherwise. This had not been done for the "Purchase Order Notification Email" which was added in saas-14 which might be unexpected. Also as in 7a03f9ce9 specify the company when displaying the logo. opw-1838112 closes #24344
Diffstat (limited to 'addons/purchase/data/mail_template_data.xml')
-rw-r--r--addons/purchase/data/mail_template_data.xml18
1 files changed, 10 insertions, 8 deletions
diff --git a/addons/purchase/data/mail_template_data.xml b/addons/purchase/data/mail_template_data.xml
index 35445697973..787f71cbe70 100644
--- a/addons/purchase/data/mail_template_data.xml
+++ b/addons/purchase/data/mail_template_data.xml
@@ -86,6 +86,8 @@ from ${object.company_id.name}.
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[<html>
<head></head>
+ % set record = ctx.get('record')
+ % set company = record and record.company_id or user.company_id
<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>
@@ -101,7 +103,7 @@ from ${object.company_id.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}">
+ <img src="/logo.png?company=${company.id}" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${company.name}">
</td>
</tr>
</table>
@@ -127,16 +129,16 @@ from ${object.company_id.name}.
<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 ''}
+ ${company.name}<br/>
+ ${company.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/>
+ % if company.email:
+ <a href="mailto:${company.email}" style="text-decoration:none; color: white;">${company.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}
+ % if company.website:
+ <a href="${company.website}" style="text-decoration:none; color: white;">
+ ${company.website}
</a>
% endif
</td>