[FIX] sale: Alter sale order confirmation mail display

Issue

	- Install "Sales" and "eCommerce"
	- Activate debug mode
	- Go to Settings->Technical->Email->Templates
	- Search and open "Sales Order: Confirmation Email" record
	- Click on stat-button "Preview"
	- Select a "Sale Order" sample  with product(s)

	The quantity column label is not in the right place/column.

Cause

	Each row of the table is a table.

Solution

	Add same fixed column size css on each table.

opw-2242914

closes odoo/odoo#51380

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nasreddin (bon)
2020-05-18 14:43:34 +00:00
parent 86ecb86069
commit 8adaaf5074
2 changed files with 30 additions and 16 deletions
+15 -8
View File
@@ -141,10 +141,16 @@
<div style="margin: 0px; padding: 0px;">
<table width="100%" style="color: #454748; font-size: 12px; border-collapse: collapse;">
<tr style="border-bottom: 2px solid #dee2e6;">
<td width="18%"><strong>Products</strong></td>
<td style="width: 150px;"><strong>Products</strong></td>
<td></td>
<td><strong>Quantity</strong></td>
<td width="10%" align="center"><strong>Price</strong></td>
<td width="15%" align="center"><strong>Quantity</strong></td>
<td width="20%" align="right"><strong>
% if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):
VAT Excl.
% else
VAT Incl.
% endif
</strong></td>
</tr>
</table>
% for line in object.order_line:
@@ -167,13 +173,14 @@
<img src="/web/image/product.product/${line.product_id.id}/image_128" style="width: 64px; height: 64px; object-fit: contain;" alt="Product image"></img>
</td>
<td align="left">${line.product_id.name}</td>
<td>${line.product_uom_qty}</td>
<td width="15%" align="center">${line.product_uom_qty}</td>
<td width="20%" align="right"><strong>
% if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):
<td align="right">${format_amount(line.price_reduce_taxexcl, object.currency_id)}</td>
% endif
% if object.user_id.has_group('account.group_show_line_subtotals_tax_included'):
<td align="right">${format_amount(line.price_reduce_taxinc, object.currency_id)}</td>
${format_amount(line.price_reduce_taxexcl, object.currency_id)}
% else
${format_amount(line.price_reduce_taxinc, object.currency_id)}
% endif
</strong></td>
</tr>
</table>
% endif
+15 -8
View File
@@ -99,10 +99,16 @@ msgid ""
" <div style=\"margin: 0px; padding: 0px;\">\n"
" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-collapse: collapse;\">\n"
" <tr style=\"border-bottom: 2px solid #dee2e6;\">\n"
" <td width=\"18%\"><strong>Products</strong></td>\n"
" <td style=\"width: 150px;\"><strong>Products</strong></td>\n"
" <td/>\n"
" <td><strong>Quantity</strong></td>\n"
" <td width=\"10%\" align=\"center\"><strong>Price</strong></td>\n"
" <td width=\"15%\" align=\"center\"><strong>Quantity</strong></td>\n"
" <td width=\"20%\" align=\"right\"><strong>\n"
" % if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):\n"
" VAT Excl.\n"
" % else\n"
" VAT Incl.\n"
" % endif\n"
" </strong></td>\n"
" </tr>\n"
" </table>\n"
" % for line in object.order_line:\n"
@@ -125,13 +131,14 @@ msgid ""
" <img src=\"/web/image/product.product/${line.product_id.id}/image_128\" style=\"width: 64px; height: 64px; object-fit: contain;\" alt=\"Product image\"/>\n"
" </td>\n"
" <td align=\"left\">${line.product_id.name}</td>\n"
" <td>${line.product_uom_qty}</td>\n"
" <td width=\"15%\" align=\"center\">${line.product_uom_qty}</td>\n"
" <td width=\"20%\" align=\"right\"><strong>\n"
" % if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):\n"
" <td align=\"right\">${format_amount(line.price_reduce_taxexcl, object.currency_id)}</td>\n"
" % endif\n"
" % if object.user_id.has_group('account.group_show_line_subtotals_tax_included'):\n"
" <td align=\"right\">${format_amount(line.price_reduce_taxinc, object.currency_id)}</td>\n"
" ${format_amount(line.price_reduce_taxexcl, object.currency_id)}\n"
" % else\n"
" ${format_amount(line.price_reduce_taxinc, object.currency_id)}\n"
" % endif\n"
" </strong></td>\n"
" </tr>\n"
" </table>\n"
" % endif\n"