summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorfw-bot <otis@odoo.com>2020-03-20 12:43:06 +0000
committerMartin Trigaux <mat@odoo.com>2020-03-24 08:25:21 +0000
commite00ce93a77fb71b49bd505eb0d883bbcb98b584f (patch)
tree8a51b2ac78ef16c297cc94ee2c104ea0c80a8237 /addons
parent27b46767b2b56c3a707297a7491fd5f848e2df32 (diff)
[FIX] sale: fix uneditable "Confirmation Email" template body
Website sale order confirmation email is broken by design. Indeed it has jinja markers between html elements that do not allow them, like between table and tr, between tr, ... In this commit we completely rewrite the structure to correctly include jinja markers where they are not moved or stripped by standard browsers and editors. Translations are updated accordingly as changing a mail template content imply updating the whole body translation. Followup of 74c5c00 website_sale: add website on some demo orders Purpose is to showcase orders using website field, used notably for some template rendering. Forward port of afd173652214000ed and f74c86d448246b796d closes odoo/odoo#48228 X-original-commit: d3bdb0a42eb052281b4652bf78e82b1c6c1c1d24 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com> Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/data/mail_data.xml239
-rw-r--r--addons/sale/i18n/sale.pot269
-rw-r--r--addons/website_sale/data/demo.xml10
3 files changed, 294 insertions, 224 deletions
diff --git a/addons/sale/data/mail_data.xml b/addons/sale/data/mail_data.xml
index 9322aed4863..6b720427155 100644
--- a/addons/sale/data/mail_data.xml
+++ b/addons/sale/data/mail_data.xml
@@ -136,119 +136,150 @@
<br/><br/>
Do not hesitate to contact us if you have any questions.
<br/><br/>
- % if object.website_id:
- <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></td>
- <td><strong>Quantity</strong></td>
- <td width="10%" align="center"><strong>Price</strong></td>
- </tr>
- % for line in object.order_line:
- % if not line.is_delivery:
- <tr style="${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}">
+ </p>
+% if object.website_id:
+ <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></td>
+ <td><strong>Quantity</strong></td>
+ <td width="10%" align="center"><strong>Price</strong></td>
+ </tr>
+ </table>
+ % for line in object.order_line:
+ % if not line.is_delivery and line.display_type in ['line_section', 'line_note']:
+ <table width="100%" style="color: #454748; font-size: 12px; border-collapse: collapse;">
+ <tr style="${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}">
+ <td colspan="4">
% if line.display_type == 'line_section':
- <td colspan="4"><strong>${line.name}</strong></td>
+ <strong>${line.name}</strong>
% elif line.display_type == 'line_note':
- <td colspan="4"><i>${line.name}</i></td>
- % else:
- <td style="width: 150px;">
- <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>
- % 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>
- % endif
+ <i>${line.name}</i>
% endif
- </tr>
- % endif
- % endfor
- </table>
- <table width="40%" style="color: #454748; font-size: 12px; border-spacing: 0px 4px;" align="right">
- % if object.carrier_id:
- <tr>
- <td style="border-top: 1px solid #dee2e6;" align="right"><strong>Delivery:</strong></td>
- <td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_delivery, object.currency_id)}</td>
- </tr>
- <tr>
- <td width="30%" align="right"><strong>SubTotal:</strong></td>
- <td align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
- </tr>
- % else:
- <tr>
- <td style="border-top: 1px solid #dee2e6;" width="30%" align="right"><strong>SubTotal:</strong></td>
- <td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
- </tr>
- % endif
- <tr>
- <td align="right"><strong>Taxes:</strong></td>
- <td align="right">${format_amount(object.amount_tax, object.currency_id)}</td>
- </tr>
- <tr>
- <td style="border-top: 1px solid #dee2e6;" align="right"><strong>Total:</strong></td>
- <td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_total, object.currency_id)}</td>
- </tr>
- </table>
- <br/>
- <table width="100%" style="color: #454748; font-size: 12px;">
- % if object.partner_invoice_id:
- <tr>
- <td style="padding-top: 10px;">
- <strong>Bill to:</strong>
- ${object.partner_invoice_id.street or ''}
- ${object.partner_invoice_id.city or ''}
- ${object.partner_invoice_id.state_id.name or ''}
- ${object.partner_invoice_id.zip or ''}
- ${object.partner_invoice_id.country_id.name or ''}
</td>
</tr>
- <tr>
- <td>
- <strong>Payment Method:</strong>
- % if transaction.payment_token_id:
- ${transaction.payment_token_id.name}
- % else:
- ${transaction.acquirer_id.name}
- % endif
- (${format_amount(transaction.amount, object.currency_id)})
+ </table>
+ % elif not line.is_delivery
+ <table width="100%" style="color: #454748; font-size: 12px; border-collapse: collapse;">
+ <tr style="${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}">
+ <td style="width: 150px;">
+ <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>
+ % 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>
+ % endif
</tr>
- % endif
- % if object.partner_shipping_id and not object.only_services:
- <tr>
- <td>
- <br/>
- <strong>Ship to:</strong>
- ${object.partner_shipping_id.street or ''}
- ${object.partner_shipping_id.city or ''}
- ${object.partner_shipping_id.state_id.name or ''}
- ${object.partner_shipping_id.zip or ''}
- ${object.partner_shipping_id.country_id.name or ''}
- </td>
- </tr>
- % if object.carrier_id:
- <tr>
- <td>
- <strong>Shipping Method:</strong>
- ${object.carrier_id.name}
- % if object.carrier_id.fixed_price == 0.0:
- (Free)
- % else:
- (${format_amount(object.carrier_id.fixed_price, object.currency_id)})
- % endif
- </td>
- </tr>
+ </table>
+ % endif
+ % endfor
+ </div>
+ % if object.carrier_id:
+ <div style="margin: 0px; padding: 0px;">
+ <table width="100%" style="color: #454748; font-size: 12px; border-spacing: 0px 4px;" align="right">
+ <tr>
+ <td style="width: 60%"/>
+ <td style="width: 30%; border-top: 1px solid #dee2e6;" align="right"><strong>Delivery:</strong></td>
+ <td style="width: 10%; border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_delivery, object.currency_id)}</td>
+ </tr>
+ <tr>
+ <td style="width: 60%"/>
+ <td style="width: 30%;" align="right"><strong>SubTotal:</strong></td>
+ <td style="width: 10%;" align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
+ </tr>
+ </table>
+ </div>
+ % else:
+ <div style="margin: 0px; padding: 0px;">
+ <table width="100%" style="color: #454748; font-size: 12px; border-spacing: 0px 4px;" align="right">
+ <tr>
+ <td style="width: 60%"/>
+ <td style="width: 30%; border-top: 1px solid #dee2e6;" align="right"><strong>SubTotal:</strong></td>
+ <td style="width: 10%; border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
+ </tr>
+ </table>
+ </div>
+ % endif
+ <div style="margin: 0px; padding: 0px;">
+ <table width="100%" style="color: #454748; font-size: 12px; border-spacing: 0px 4px;" align="right">
+ <tr>
+ <td style="width: 60%"/>
+ <td style="width: 30%;" align="right"><strong>Taxes:</strong></td>
+ <td style="width: 10%;" align="right">${format_amount(object.amount_tax, object.currency_id)}</td>
+ </tr>
+ <tr>
+ <td style="width: 60%"/>
+ <td style="width: 30%; border-top: 1px solid #dee2e6;" align="right"><strong>Total:</strong></td>
+ <td style="width: 10%; border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_total, object.currency_id)}</td>
+ </tr>
+ </table>
+ </div>
+ % if object.partner_invoice_id:
+ <div style="margin: 0px; padding: 0px;">
+ <table width="100%" style="color: #454748; font-size: 12px;">
+ <tr>
+ <td style="padding-top: 10px;">
+ <strong>Bill to:</strong>
+ ${object.partner_invoice_id.street or ''}
+ ${object.partner_invoice_id.city or ''}
+ ${object.partner_invoice_id.state_id.name or ''}
+ ${object.partner_invoice_id.zip or ''}
+ ${object.partner_invoice_id.country_id.name or ''}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong>Payment Method:</strong>
+ % if transaction.payment_token_id:
+ ${transaction.payment_token_id.name}
+ % else:
+ ${transaction.acquirer_id.name}
+ % endif
+ (${format_amount(transaction.amount, object.currency_id)})
+ </td>
+ </tr>
+ </table>
+ </div>
+ % endif
+ % if object.partner_shipping_id and not object.only_services:
+ <div style="margin: 0px; padding: 0px;">
+ <table width="100%" style="color: #454748; font-size: 12px;">
+ <tr>
+ <td>
+ <br/>
+ <strong>Ship to:</strong>
+ ${object.partner_shipping_id.street or ''}
+ ${object.partner_shipping_id.city or ''}
+ ${object.partner_shipping_id.state_id.name or ''}
+ ${object.partner_shipping_id.zip or ''}
+ ${object.partner_shipping_id.country_id.name or ''}
+ </td>
+ </tr>
+ </table>
+ % if object.carrier_id:
+ <table width="100%" style="color: #454748; font-size: 12px;">
+ <tr>
+ <td>
+ <strong>Shipping Method:</strong>
+ ${object.carrier_id.name}
+ % if object.carrier_id.fixed_price == 0.0:
+ (Free)
+ % else:
+ (${format_amount(object.carrier_id.fixed_price, object.currency_id)})
% endif
- % endif
- </table>
+ </td>
+ </tr>
+ </table>
% endif
- </p>
-</div>
- </field>
+ </div>
+ % endif
+% endif
+</div></field>
<field name="report_template" ref="action_report_saleorder"/>
<field name="report_name">${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot
index af410204259..5508c655595 100644
--- a/addons/sale/i18n/sale.pot
+++ b/addons/sale/i18n/sale.pot
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~13.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-02-13 08:34+0000\n"
-"PO-Revision-Date: 2020-02-13 08:34+0000\n"
+"POT-Creation-Date: 2020-03-24 07:00+0000\n"
+"PO-Revision-Date: 2020-03-24 07:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -95,119 +95,150 @@ msgid ""
" <br/><br/>\n"
" Do not hesitate to contact us if you have any questions.\n"
" <br/><br/>\n"
-" % if object.website_id:\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/>\n"
-" <td><strong>Quantity</strong></td>\n"
-" <td width=\"10%\" align=\"center\"><strong>Price</strong></td>\n"
-" </tr>\n"
-" % for line in object.order_line:\n"
-" % if not line.is_delivery:\n"
-" <tr style=\"${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}\">\n"
+" </p>\n"
+"% if object.website_id:\n"
+" <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/>\n"
+" <td><strong>Quantity</strong></td>\n"
+" <td width=\"10%\" align=\"center\"><strong>Price</strong></td>\n"
+" </tr>\n"
+" </table>\n"
+" % for line in object.order_line:\n"
+" % if not line.is_delivery and line.display_type in ['line_section', 'line_note']:\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-collapse: collapse;\">\n"
+" <tr style=\"${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}\">\n"
+" <td colspan=\"4\">\n"
" % if line.display_type == 'line_section':\n"
-" <td colspan=\"4\"><strong>${line.name}</strong></td>\n"
+" <strong>${line.name}</strong>\n"
" % elif line.display_type == 'line_note':\n"
-" <td colspan=\"4\"><i>${line.name}</i></td>\n"
-" % else:\n"
-" <td style=\"width: 150px;\">\n"
-" <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"
-" % 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"
-" % endif\n"
+" <i>${line.name}</i>\n"
" % endif\n"
-" </tr>\n"
-" % endif\n"
-" % endfor\n"
-" </table>\n"
-" <table width=\"40%\" style=\"color: #454748; font-size: 12px; border-spacing: 0px 4px;\" align=\"right\">\n"
-" % if object.carrier_id:\n"
-" <tr>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" align=\"right\"><strong>Delivery:</strong></td>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_delivery, object.currency_id)}</td>\n"
-" </tr>\n"
-" <tr>\n"
-" <td width=\"30%\" align=\"right\"><strong>SubTotal:</strong></td>\n"
-" <td align=\"right\">${format_amount(object.amount_untaxed, object.currency_id)}</td>\n"
-" </tr>\n"
-" % else:\n"
-" <tr>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" width=\"30%\" align=\"right\"><strong>SubTotal:</strong></td>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_untaxed, object.currency_id)}</td>\n"
-" </tr>\n"
-" % endif\n"
-" <tr>\n"
-" <td align=\"right\"><strong>Taxes:</strong></td>\n"
-" <td align=\"right\">${format_amount(object.amount_tax, object.currency_id)}</td>\n"
-" </tr>\n"
-" <tr>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" align=\"right\"><strong>Total:</strong></td>\n"
-" <td style=\"border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_total, object.currency_id)}</td>\n"
-" </tr>\n"
-" </table>\n"
-" <br/>\n"
-" <table width=\"100%\" style=\"color: #454748; font-size: 12px;\">\n"
-" % if object.partner_invoice_id:\n"
-" <tr>\n"
-" <td style=\"padding-top: 10px;\">\n"
-" <strong>Bill to:</strong>\n"
-" ${object.partner_invoice_id.street or ''}\n"
-" ${object.partner_invoice_id.city or ''}\n"
-" ${object.partner_invoice_id.state_id.name or ''}\n"
-" ${object.partner_invoice_id.zip or ''}\n"
-" ${object.partner_invoice_id.country_id.name or ''}\n"
" </td>\n"
" </tr>\n"
-" <tr>\n"
-" <td>\n"
-" <strong>Payment Method:</strong>\n"
-" % if transaction.payment_token_id:\n"
-" ${transaction.payment_token_id.name}\n"
-" % else:\n"
-" ${transaction.acquirer_id.name}\n"
-" % endif\n"
-" (${format_amount(transaction.amount, object.currency_id)})\n"
-" </td>\n"
-" </tr>\n"
-" % endif\n"
-" % if object.partner_shipping_id and not object.only_services:\n"
-" <tr>\n"
-" <td>\n"
-" <br/>\n"
-" <strong>Ship to:</strong>\n"
-" ${object.partner_shipping_id.street or ''}\n"
-" ${object.partner_shipping_id.city or ''}\n"
-" ${object.partner_shipping_id.state_id.name or ''}\n"
-" ${object.partner_shipping_id.zip or ''}\n"
-" ${object.partner_shipping_id.country_id.name or ''}\n"
+" </table>\n"
+" % elif not line.is_delivery\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-collapse: collapse;\">\n"
+" <tr style=\"${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}\">\n"
+" <td style=\"width: 150px;\">\n"
+" <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"
+" % 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"
+" % endif\n"
" </tr>\n"
-" % if object.carrier_id:\n"
-" <tr>\n"
-" <td>\n"
-" <strong>Shipping Method:</strong>\n"
-" ${object.carrier_id.name}\n"
-" % if object.carrier_id.fixed_price == 0.0:\n"
-" (Free)\n"
-" % else:\n"
-" (${format_amount(object.carrier_id.fixed_price, object.currency_id)})\n"
-" % endif\n"
-" </td>\n"
-" </tr>\n"
+" </table>\n"
+" % endif\n"
+" % endfor\n"
+" </div>\n"
+" % if object.carrier_id:\n"
+" <div style=\"margin: 0px; padding: 0px;\">\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-spacing: 0px 4px;\" align=\"right\">\n"
+" <tr>\n"
+" <td style=\"width: 60%\"/>\n"
+" <td style=\"width: 30%; border-top: 1px solid #dee2e6;\" align=\"right\"><strong>Delivery:</strong></td>\n"
+" <td style=\"width: 10%; border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_delivery, object.currency_id)}</td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td style=\"width: 60%\"/>\n"
+" <td style=\"width: 30%;\" align=\"right\"><strong>SubTotal:</strong></td>\n"
+" <td style=\"width: 10%;\" align=\"right\">${format_amount(object.amount_untaxed, object.currency_id)}</td>\n"
+" </tr>\n"
+" </table>\n"
+" </div>\n"
+" % else:\n"
+" <div style=\"margin: 0px; padding: 0px;\">\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-spacing: 0px 4px;\" align=\"right\">\n"
+" <tr>\n"
+" <td style=\"width: 60%\"/>\n"
+" <td style=\"width: 30%; border-top: 1px solid #dee2e6;\" align=\"right\"><strong>SubTotal:</strong></td>\n"
+" <td style=\"width: 10%; border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_untaxed, object.currency_id)}</td>\n"
+" </tr>\n"
+" </table>\n"
+" </div>\n"
+" % endif\n"
+" <div style=\"margin: 0px; padding: 0px;\">\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px; border-spacing: 0px 4px;\" align=\"right\">\n"
+" <tr>\n"
+" <td style=\"width: 60%\"/>\n"
+" <td style=\"width: 30%;\" align=\"right\"><strong>Taxes:</strong></td>\n"
+" <td style=\"width: 10%;\" align=\"right\">${format_amount(object.amount_tax, object.currency_id)}</td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td style=\"width: 60%\"/>\n"
+" <td style=\"width: 30%; border-top: 1px solid #dee2e6;\" align=\"right\"><strong>Total:</strong></td>\n"
+" <td style=\"width: 10%; border-top: 1px solid #dee2e6;\" align=\"right\">${format_amount(object.amount_total, object.currency_id)}</td>\n"
+" </tr>\n"
+" </table>\n"
+" </div>\n"
+" % if object.partner_invoice_id:\n"
+" <div style=\"margin: 0px; padding: 0px;\">\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px;\">\n"
+" <tr>\n"
+" <td style=\"padding-top: 10px;\">\n"
+" <strong>Bill to:</strong>\n"
+" ${object.partner_invoice_id.street or ''}\n"
+" ${object.partner_invoice_id.city or ''}\n"
+" ${object.partner_invoice_id.state_id.name or ''}\n"
+" ${object.partner_invoice_id.zip or ''}\n"
+" ${object.partner_invoice_id.country_id.name or ''}\n"
+" </td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td>\n"
+" <strong>Payment Method:</strong>\n"
+" % if transaction.payment_token_id:\n"
+" ${transaction.payment_token_id.name}\n"
+" % else:\n"
+" ${transaction.acquirer_id.name}\n"
" % endif\n"
-" % endif\n"
-" </table>\n"
+" (${format_amount(transaction.amount, object.currency_id)})\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
+" </div>\n"
+" % endif\n"
+" % if object.partner_shipping_id and not object.only_services:\n"
+" <div style=\"margin: 0px; padding: 0px;\">\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px;\">\n"
+" <tr>\n"
+" <td>\n"
+" <br/>\n"
+" <strong>Ship to:</strong>\n"
+" ${object.partner_shipping_id.street or ''}\n"
+" ${object.partner_shipping_id.city or ''}\n"
+" ${object.partner_shipping_id.state_id.name or ''}\n"
+" ${object.partner_shipping_id.zip or ''}\n"
+" ${object.partner_shipping_id.country_id.name or ''}\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
+" % if object.carrier_id:\n"
+" <table width=\"100%\" style=\"color: #454748; font-size: 12px;\">\n"
+" <tr>\n"
+" <td>\n"
+" <strong>Shipping Method:</strong>\n"
+" ${object.carrier_id.name}\n"
+" % if object.carrier_id.fixed_price == 0.0:\n"
+" (Free)\n"
+" % else:\n"
+" (${format_amount(object.carrier_id.fixed_price, object.currency_id)})\n"
+" % endif\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
" % endif\n"
-" </p>\n"
-"</div>\n"
-" "
+" </div>\n"
+" % endif\n"
+"% endif\n"
+"</div>"
msgstr ""
#. module: sale
@@ -1280,9 +1311,7 @@ msgstr ""
#: model:ir.model.fields,help:sale.field_sale_order__expected_date
msgid ""
"Delivery date you can promise to the customer, computed from the minimum "
-"lead time of the order lines in case of Service products. In case of "
-"shipping, the shipping policy of the order will be taken into account to "
-"either use the minimum or maximum lead time of the order lines."
+"lead time of the order lines."
msgstr ""
#. module: sale
@@ -2035,6 +2064,11 @@ msgid "Margins"
msgstr ""
#. module: sale
+#: model:ir.actions.server,name:sale.model_sale_order_action_quotation_sent
+msgid "Mark Quotation as Sent"
+msgstr ""
+
+#. module: sale
#: model_terms:ir.ui.view,arch_db:sale.account_invoice_form
msgid "Marketing"
msgstr ""
@@ -2291,6 +2325,12 @@ msgid "Only Integer Value should be valid."
msgstr ""
#. module: sale
+#: code:addons/sale/models/sale.py:0
+#, python-format
+msgid "Only draft orders can be marked as sent directly."
+msgstr ""
+
+#. module: sale
#: model:ir.model.constraint,message:sale.constraint_product_attribute_custom_value_sol_custom_value_unique
msgid ""
"Only one Custom Value is allowed per Attribute Value per Sales Order Line."
@@ -4128,14 +4168,3 @@ msgstr ""
#: model:ir.model.fields,help:sale.field_sale_order__amount_by_group
msgid "type: [(name, amount, base, formated amount, formated base)]"
msgstr ""
-
-#. module: sale
-#: model:ir.actions.server,name:sale.model_sale_order_action_quotation_sent
-msgid "Mark Quotation as Sent"
-msgstr ""
-
-#. module: sale
-#: code:addons/sale/models/sale.py:0
-#, python-format
-msgid "Only draft orders can be marked as sent directly."
-msgstr ""
diff --git a/addons/website_sale/data/demo.xml b/addons/website_sale/data/demo.xml
index 3e38aadb212..4e4b8726665 100644
--- a/addons/website_sale/data/demo.xml
+++ b/addons/website_sale/data/demo.xml
@@ -410,6 +410,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="(datetime.now()-relativedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
@@ -430,6 +431,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="datetime.now()"/>
@@ -450,6 +452,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="(datetime.now()-relativedelta(hours=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
@@ -479,6 +482,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="datetime.now()"/>
@@ -499,6 +503,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="(datetime.now()-timedelta(hours=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
@@ -519,6 +524,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="payment_term_id" ref="account.account_payment_term_immediate"/>
@@ -541,6 +547,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
</record>
@@ -560,6 +567,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="datetime.now()-relativedelta(months=1)"/>
@@ -581,6 +589,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="datetime.now()-relativedelta(months=1, days=2)"/>
@@ -602,6 +611,7 @@
<field name="partner_invoice_id" ref="base.res_partner_address_25"/>
<field name="partner_shipping_id" ref="base.res_partner_address_25"/>
<field name="user_id" ref="base.user_demo"/>
+ <field name="website_id" ref="website.default_website"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.salesteam_website_sales"/>
<field name="date_order" eval="datetime.now()-relativedelta(months=2)"/>