From 4bbc666cae6939b7725b1e4e6d1c387a07ce0854 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Fri, 29 May 2020 15:56:07 +0000 Subject: [PATCH] [IMP] account: put payment reference in invoice mail Before, only when you had installed the Belgian structured communication module, when you sent an invoice by mail then only the structured communication would be added in the mail. But it should be visible all the time when you have a payment reference. closes odoo/odoo#52618 Signed-off-by: oco-odoo --- addons/account/data/mail_template_data.xml | 4 ++ addons/l10n_be_invoice_bba/__manifest__.py | 1 - .../data/mail_template_data.xml | 39 ------------------- 3 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 addons/l10n_be_invoice_bba/data/mail_template_data.xml diff --git a/addons/account/data/mail_template_data.xml b/addons/account/data/mail_template_data.xml index 628e3215dde..26854234738 100644 --- a/addons/account/data/mail_template_data.xml +++ b/addons/account/data/mail_template_data.xml @@ -36,6 +36,10 @@ This invoice is already paid. % else: Please remit payment at your earliest convenience. + % if object.invoice_payment_ref: +

+ Please use the following communication for your payment: ${object.invoice_payment_ref}. + % endif % endif

Do not hesitate to contact us if you have any questions. diff --git a/addons/l10n_be_invoice_bba/__manifest__.py b/addons/l10n_be_invoice_bba/__manifest__.py index 0fd920324be..3ce3facdf26 100644 --- a/addons/l10n_be_invoice_bba/__manifest__.py +++ b/addons/l10n_be_invoice_bba/__manifest__.py @@ -24,7 +24,6 @@ Two algorithms are suggested: """, 'depends': ['account', 'l10n_be'], 'data': [ - 'data/mail_template_data.xml', ], 'auto_install': True, } diff --git a/addons/l10n_be_invoice_bba/data/mail_template_data.xml b/addons/l10n_be_invoice_bba/data/mail_template_data.xml deleted file mode 100644 index 1599a31d186..00000000000 --- a/addons/l10n_be_invoice_bba/data/mail_template_data.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - -
-

- Dear ${object.partner_id.name} - % if object.partner_id.parent_id: - (${object.partner_id.parent_id.name}) - % endif -

- Here is, in attachment, your - % if object.name: - invoice ${object.name} - % else: - invoice - % endif - % if object.invoice_origin: - (with reference: ${object.invoice_origin} ) - % endif - amounting in ${format_amount(object.amount_total, object.currency_id)} - from ${object.company_id.name}. - % if object.payment_state=='paid': - This invoice is already paid. - % else: - Please remit payment at your earliest convenience. - % if object.invoice_reference_type=='structured' and object.ref: - Please use the following communication for your payment: ${object.ref}. - % endif - % endif -

- Do not hesitate to contact us if you have any questions. -

-
-
-
-
-