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} - - - ${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. -
- - - ]]>
-
- -
-
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. +
+
+
+ +
+