From 4e11d2fcb0e3e6b830bbef82f1d0de383ef8abae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 22 Aug 2017 14:38:23 +0200 Subject: [CLN] account: perform some guidelining and cleaning * rename some files according to guidelines; * clean template name to clean their ordering and ease template browsing; * use html type for mail templates body instead of cdata; * clean html for mail templates introduced at 96da10de6cc20486b3e37fd4c6c88eb61cbb919c; No horse has been harmed and no functional change performed. --- addons/account/data/mail_template_data.xml | 140 +++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 addons/account/data/mail_template_data.xml (limited to 'addons/account/data/mail_template_data.xml') diff --git a/addons/account/data/mail_template_data.xml b/addons/account/data/mail_template_data.xml new file mode 100644 index 00000000000..266ac35855b --- /dev/null +++ b/addons/account/data/mail_template_data.xml @@ -0,0 +1,140 @@ + + + + + + + + Account: Invoice email + ${(object.user_id.email and '%s <%s>' % (object.user_id.name, object.user_id.email) or '')|safe} + ${object.company_id.name} Invoice (Ref ${object.number or 'n/a'}) + ${object.partner_id.id} + + + + Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''} + ${object.partner_id.lang} + +
+

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 = is_online and object.get_mail_url() or '/report/pdf/account.report_invoice/' + str(object.id) + +% if object.partner_id.parent_id: + (${object.partner_id.parent_id.name}) +% endif +,

+

Here is, in attachment, your +% if object.number: +invoice ${object.number} +% else: +invoice +% endif +% if object.origin: +(with reference: ${object.origin}) +% endif +amounting in ${object.amount_total} ${object.currency_id.name} +from ${object.company_id.name}. +

+ +% if is_online: +

+
+ View Invoice +
+% endif +

+ +% if object.state=='paid': +

This invoice is already paid.

+% else: +

Please remit payment at your earliest convenience.

+% endif + +

Thank you,

+

+% if object.user_id and object.user_id.signature: + ${object.user_id.signature | safe} +% endif +

+
+
+ + + + Account: Invoice notification header + ${object.subject} + + + +
+% set record = ctx.get('record') +% set company = record and record.company_id or user.company_id + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + Invoice ${object.record_name} + + + ${company.name} +
+
+ + + + +
+ ${object.body | safe} +
+
+ + + + + +
+ ${company.name}
+ ${company.phone or ''} +
+ % if company.email: + ${company.email}
+ % endif + % if company.website: + + ${company.website} + + % endif +
+
+ Powered by Odoo. +
+
+
+ +
+
-- cgit v1.2.3