Files
odoo_source/addons/account/data/mail_template_data.xml
T
Nikunj Ladava d68d8d9039 [IMP] sale_payment,website_sale: send email when automatic invoice activated
Currently when in payment is configure in automatic invoice mode,
customers don't receive anything.
If they want to see their invoice, they have to log into their portal
account.

Task #1866497
Closes #25864
2018-08-10 17:01:41 +02:00

51 lines
2.0 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">Invoice: Send by email</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="email_from">${object.user_id.email_formatted |safe}</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear ${object.partner_id.name}
% if object.partner_id.parent_id:
(${object.partner_id.parent_id.name})
% endif
<br /><br />
Here is 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}.
% if object.state=='paid':
This invoice is already paid.
% else:
Please remit payment at your earliest convenience.
% endif
<br /><br />
Do not hesitate to contact us if you have any question.
</p>
</div>
</field>
<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="user_signature" eval="False"/>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>