summaryrefslogtreecommitdiff
path: root/addons/account/data
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-04-18 16:53:04 +0200
committerGoffin Simon <sig@odoo.com>2018-04-23 09:33:22 +0200
commit4ac10f20c45a401161fd8714c808728ff4364dc2 (patch)
tree98a6c40fee0121298fa3bc53835d84c6abd4e058 /addons/account/data
parentab95e3c1f3565f8c63cd2e1e4349f646334cf94e (diff)
[FIX] account, purchase, sale: Wrong company displayed in the footer
Steps to reproduce the bug: - Set a multi company environment with two company A and B - Set user admin in company A - Set user demo in company B - Create a PO with user demo - Send a RFQ Bug: The company of the admin user was displayed in the footer of the email. The function _notify called on res.parter model is called in sudo by the function _notify on mail.message model. The function render_template on mail.template model uses the user defined on self.env to render the template. So the user admin was always used. opw:1835647
Diffstat (limited to 'addons/account/data')
-rw-r--r--addons/account/data/email_template_data_invoice.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/data/email_template_data_invoice.xml b/addons/account/data/email_template_data_invoice.xml
index b012e8cbbf1..7701b1ce222 100644
--- a/addons/account/data/email_template_data_invoice.xml
+++ b/addons/account/data/email_template_data_invoice.xml
@@ -70,7 +70,7 @@ from ${object.company_id.name}.
<field name="body_html"><![CDATA[<html>
<head></head>
% set record = ctx.get('record')
- % set company = record and record.company_id or user.company_id
+ % set company = record and record.company_id or ctx.get('company')
<body style="margin: 0; padding: 0;">
<table border="0" width="100%" cellpadding="0" bgcolor="#ededed" style="padding: 20px; background-color: #ededed; border-collapse:separate;" summary="o_mail_notification">
<tbody>