Skip to content

Instantly share code, notes, and snippets.

@ilyasProgrammer
Last active October 13, 2021 11:52
Show Gist options
  • Save ilyasProgrammer/5acde7ad6e6a15a9d6800242ed3565e8 to your computer and use it in GitHub Desktop.
Save ilyasProgrammer/5acde7ad6e6a15a9d6800242ed3565e8 to your computer and use it in GitHub Desktop.
Odoo email template with context, table and loop
<p>Dear,</p>
<p>The following invoices are not collected:</p>
<div style="width: 150px;float:left;font-weight:bold">Invoice Number</div>
<div style="width: 150px;float:left;font-weight:bold">Customer</div>
<div style="width: 150px;float:left;font-weight:bold">Invoice Value</div>
<div style="width: 150px;float:left;font-weight:bold">Invoice Date</div>
<div style="width: 150px;float:left;font-weight:bold">Due Date</div>
% for row in ctx.get('recs'):
<br>
<div style="width: 150px;float:left">${row.number}</div>
<div style="width: 150px;float:left">${row.partner_id.name}</div>
<div style="width: 150px;float:left">${row.amount_total}</div>
<div style="width: 150px;float:left">${row.date_invoice}</div>
<div style="width: 150px;float:left">${row.date_due}</div>
% endfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment