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: [PATCH] [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/__manifest__.py | 2 +-
.../data/email_template_data_invoice.xml | 145 ------------------
addons/account/data/mail_template_data.xml | 140 +++++++++++++++++
3 files changed, 141 insertions(+), 146 deletions(-)
delete mode 100644 addons/account/data/email_template_data_invoice.xml
create mode 100644 addons/account/data/mail_template_data.xml
diff --git a/addons/account/__manifest__.py b/addons/account/__manifest__.py
index 8c44a113c8a..a87fc2360f7 100644
--- a/addons/account/__manifest__.py
+++ b/addons/account/__manifest__.py
@@ -24,7 +24,7 @@ Core mechanisms for the accounting modules. To display the menuitems, install th
'wizard/account_move_reversal_view.xml',
'views/account_view.xml',
'views/account_report.xml',
- 'data/email_template_data_invoice.xml',
+ 'data/mail_template_data.xml',
'wizard/account_invoice_refund_view.xml',
'wizard/account_validate_move_view.xml',
'wizard/account_invoice_state_view.xml',
diff --git a/addons/account/data/email_template_data_invoice.xml b/addons/account/data/email_template_data_invoice.xml
deleted file mode 100644
index b0e8dd1d175..00000000000
--- a/addons/account/data/email_template_data_invoice.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
- Invoice - Send by 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
-
-]]>
-
-
-
-
- Invoice Notification Email
- ${object.subject}
-
-
-
-
- % set record = ctx.get('record')
- % set company = record and record.company_id or user.company_id
-
-
-
-
-
-
-
-
-
- |
-
- Invoice ${object.record_name}
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
- |
- ${object.body | safe}
- |
-
-
- |
-
-
-
-
- |
-
- |
-
-
- |
- Powered by Odoo.
- |
-
-
-
-
-