From 45eb9f0503340583bb88578ca635504d1e788d2e Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Thu, 8 Oct 2020 13:42:31 +0000 Subject: [PATCH] [FIX] account: fix email onchange on invoice template - Activate debug mode - Go to Settings > Technical > Templates - Duplicate "Invoice: Send by email" and edit the copy (Name & Content) - Go to Accounting > Customers > Invoices and create an Invoice - Post it - Send & Print - In the wizard, select the duplicated template (the content will be updated) - Uncheck "Email" option, the re-check it The selected template is still the duplicated one, but the content is the one from the default template. opw-2345200 closes odoo/odoo#59628 X-original-commit: cd6c54b15ce328b58888a4f33a64ae61c7744a90 Signed-off-by: Anh Thao PHAM --- addons/account/wizard/account_invoice_send.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/wizard/account_invoice_send.py b/addons/account/wizard/account_invoice_send.py index daf1ae3cfe0..7aff5d224c4 100644 --- a/addons/account/wizard/account_invoice_send.py +++ b/addons/account/wizard/account_invoice_send.py @@ -63,6 +63,8 @@ class AccountInvoiceSend(models.TransientModel): 'composition_mode': 'comment' if len(res_ids) == 1 else 'mass_mail', 'template_id': self.template_id.id }) + else: + self.composer_id.template_id = self.template_id.id self.composer_id.onchange_template_id_wrapper() @api.onchange('is_email')