summaryrefslogtreecommitdiff
path: root/addons/account/wizard
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-01-11 16:32:24 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-01-11 16:32:24 +0000
commit9b585963a4b4f53b856b219004322232c2acf318 (patch)
tree262038dae6020d851f57e7840a288ca423ac16f0 /addons/account/wizard
parentb7a98151694cd7e65d168cdc52dbf803c792b52d (diff)
[FIX] account: compute composition mode before changing template
From Invoice list view select 2+ invoices (A, B), click Action>send and print In each invoice 2 invoices will be sent: - In A, you'll find A and A - In B, you'll find A and B This occur because the composition_mode of the composer is computed after the attachment has been generated. When the composer has an attachment, it is included into the sent mail along the relevant one, generated on the fly for each record. opw-2428544 closes odoo/odoo#64360 Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/account/wizard')
-rw-r--r--addons/account/wizard/account_invoice_send.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/account/wizard/account_invoice_send.py b/addons/account/wizard/account_invoice_send.py
index f1bacc3d9d5..b9aae09e5c8 100644
--- a/addons/account/wizard/account_invoice_send.py
+++ b/addons/account/wizard/account_invoice_send.py
@@ -66,6 +66,7 @@ class AccountInvoiceSend(models.TransientModel):
else:
self.composer_id.composition_mode = 'comment' if len(res_ids) == 1 else 'mass_mail'
self.composer_id.template_id = self.template_id.id
+ self._compute_composition_mode()
self.composer_id.onchange_template_id_wrapper()
@api.onchange('is_email')