diff options
| author | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-04-20 07:34:54 +0000 |
|---|---|---|
| committer | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-04-20 11:35:08 +0000 |
| commit | 4faf329defed8bf915d132e81cda1189c31423ae (patch) | |
| tree | 3a94843a20778b09890d1c1446febe0af47d4393 /addons/mail/data | |
| parent | 3bd345597fa932abdaf780f72bacf331690f549b (diff) | |
[FIX] mail: Fallback to default company logo instead of odoobot
For some specific report (i.e account followup report) the mail_message
sent will contains no company informations because it will be sent on
the partner context, so when generating the template the logo will be
retrieved from the route /logo.png?company=False which yield back the
odoo company logo.
Adding a default 0 allow to retrieve the company logo for the current
user
opw-2232184
closes odoo/odoo#49787
X-original-commit: eea99fe1e00eb2dbd2bbeaca3e2f09845b426267
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/mail/data')
| -rw-r--r-- | addons/mail/data/mail_data.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 3e0c6ca6b37..f7db5a78a0a 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -67,7 +67,7 @@ </t> </td> <td valign="center" align="right"> - <img t-att-src="'/logo.png?company=%s' % company.id" style="padding: 0px; margin: 0px; height: auto; max-width: 200px; max-height: 36px;" t-att-alt="'%s' % company.name"/> + <img t-att-src="'/logo.png?company=%s' % (company.id or 0)" style="padding: 0px; margin: 0px; height: auto; max-width: 200px; max-height: 36px;" t-att-alt="'%s' % company.name"/> </td> </tr><tr> <td colspan="2" style="text-align:center;"> @@ -115,7 +115,7 @@ <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"/> + <img t-att-src="'/logo.png?company=%s' % (company.id or 0)" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="'%s' % company.name"/> </td></tr> </table> </td> @@ -174,7 +174,7 @@ <t t-esc="message.record_name and message.record_name.replace('/','-') or ''"/> </span> </td><td valign="middle" align="right"> - <img t-att-src="'/logo.png?company=%s' % company.id" style="padding: 0px; margin: 0px; height: 48px;" t-att-alt="'%s' % company.name"/> + <img t-att-src="'/logo.png?company=%s' % (company.id or 0)" style="padding: 0px; margin: 0px; height: 48px;" t-att-alt="'%s' % company.name"/> </td></tr> <tr><td colspan="2" style="text-align:center;"> <hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin:4px 0px 32px 0px;"/> @@ -244,7 +244,7 @@ <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: 48px;" t-att-alt="'%s' % company.name"/> + <img t-att-src="'/logo.png?company=%s' % (company.id or 0)" style="padding: 0px; margin: 0px; height: 48px;" t-att-alt="'%s' % company.name"/> </td></tr> <tr><td colspan="2" style="text-align:center;"> <hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin:4px 0px 32px 0px;"/> |
