Files
odoo_source/addons/account/data/mail_template_data.xml
T
Thibault Delavallée 885e7fcda9 [REF] various: use secondary notification template
All those templates are basically the same except some bug fixes that
were not propagated about company. Let us use just the one we just
defined in the mail module.
2018-01-29 16:56:04 +01:00

66 lines
2.3 KiB
XML

<?xml version="1.0" ?>
<odoo>
<!-- Mail template are declared in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<!--Email template -->
<record id="email_template_edi_invoice" model="mail.template">
<field name="name">Invoicing: Invoice email</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="account_invoices"/>
<field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html" type="html">
<div>
<p>Dear ${object.partner_id.name}
% set access_action = object.with_context(force_website=True).get_access_action()
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
% set access_url = object.get_mail_url()
% if object.partner_id.parent_id:
(<i>${object.partner_id.parent_id.name}</i>)
% endif
,</p>
<p>Here is, in attachment, your
% if object.number:
invoice <strong>${object.number}</strong>
% else:
invoice
% endif
% if object.origin:
(with reference: ${object.origin})
% endif
amounting in <strong>${format_amount(object.amount_total, object.currency_id)}</strong>
from ${object.company_id.name}.
</p>
% if is_online:
<br/><br/>
<center>
<a href="${access_url}" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">View Invoice</a>
</center>
% endif
<br/><br/>
% if object.state=='paid':
<p>This invoice is already paid.</p>
% else:
<p>Please remit payment at your earliest convenience.</p>
% endif
<p>Thank you,</p>
<p style="color:#888888">
% if object.user_id and object.user_id.signature:
${object.user_id.signature | safe}
% endif
</p>
</div></field>
</record>
</data>
</odoo>