Skip to content
Snippets Groups Projects
Commit 0d226f08 authored by Nasreddin Boulif (bon)'s avatar Nasreddin Boulif (bon)
Browse files

[FIX] mail: display correctly button on windows Outlook mail client

Steps to reproduce:

  - Install 'Sales' module (for test purpose)
  - Configure the outgoing mail server
  - Change Demo user email to an Outlook account
  - Create or Open a quotation
  - In the chatter, send a log note with `@Marc Demo`
  - Check the email received in the windows Outlook mail client

Issue:

  The button is not well displayed (the padding between the text and
  the border is not filled with the background color).

Solution:

  Use a `table` around the button(s) and move some CSS to the `td`
  around the button to display it correctly.

  [More info here](https://medium.com/email-design/outlook-rendering-issues-5-tips-to-ensure-your-emails-display-properly-9520b2456166

)

opw-3142132

closes odoo/odoo#115012

Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
parent e9f5b3bd
No related branches found
No related tags found
No related merge requests found
......@@ -59,19 +59,22 @@
<table cellspacing="0" cellpadding="0" border="0" style="width: 600px; margin-top: 5px;">
<tbody><tr>
<td valign="center">
<a t-if="has_button_access"
t-att-href="button_access['url']"
style="padding: 8px 12px; font-size: 12px; color: #FFFFFF; text-decoration: none !important; font-weight: 400; background-color: #875A7B; border: 0px solid #875A7B; border-radius:3px">
<t t-esc="button_access['title']"/>
</a>
<t t-if="actions">
<t t-foreach="actions" t-as="action">
|
<a t-att-href="action['url']" style="color: #875A7B; text-decoration:none !important;">
<t t-esc="action['title']"/>
<table cellspacing="0" cellpadding="0" border="0"><tr>
<td t-if="has_button_access" style="padding: 8px 12px; border-radius: 3px; background-color: #875A7B;">
<a t-att-href="button_access['url']" class="button-a button-a-primary"
style="font-size: 12px; color: #FFFFFF; text-decoration: none !important; font-weight: 400;">
<t t-esc="button_access['title']"/>
</a>
</t>
</t>
</td>
<td t-if="actions">
<t t-foreach="actions" t-as="action">
|
<a t-att-href="action['url']" style="color: #875A7B; text-decoration:none !important;">
<t t-esc="action['title']"/>
</a>
</t>
</td>
</tr></table>
</td>
<td valign="center" align="right">
<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"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment