summaryrefslogtreecommitdiff
path: root/addons/account/data/mail_template_data.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-07-17 13:22:37 +0200
committerThibault Delavallée <tde@odoo.com>2018-07-19 17:14:33 +0200
commit14a3fd6018d258e5f04275f1e388efe5880d5ae7 (patch)
tree57883cfdf62cb90174f981b0844b94d32b1a3b09 /addons/account/data/mail_template_data.xml
parentbc79f92481269c42077a9ab4292ed53c7a95d8e7 (diff)
[REF] account: clean send by email template
Purpose * use the new notification template allowing to display the payment button only in emails; * reorder the fields definition to ease the reading; * slightly clean the email body using a maximum of div and br tags as it seems better integrated with Odoo edition capabilities; This commit is linked to task ID 1860049 and PR #25824.
Diffstat (limited to 'addons/account/data/mail_template_data.xml')
-rw-r--r--addons/account/data/mail_template_data.xml87
1 files changed, 36 insertions, 51 deletions
diff --git a/addons/account/data/mail_template_data.xml b/addons/account/data/mail_template_data.xml
index 4bb340a4f5c..eaaf9632798 100644
--- a/addons/account/data/mail_template_data.xml
+++ b/addons/account/data/mail_template_data.xml
@@ -6,60 +6,45 @@
<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 '&quot;%s&quot; &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="name">Invoice: Send by email</field>
<field name="model_id" ref="account.model_account_invoice"/>
- <field name="auto_delete" eval="True"/>
+ <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, 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}.
+ % 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="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>
+ <field name="user_signature" eval="False"/>
+ <field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>