From 3d27337f6d44bfc6204d964ca61a552b8f32e771 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 24 Jun 2019 08:33:45 +0000 Subject: [PATCH] [FIX] account: correct communication when registering payment for multiple invoices When registering a payment against multiple vendor bills and change the memo, the memo must be populated to all the payments. This behavior has been introduced with the following commit in stable 11.0: c04065abd8f62c9a211c8fa824f5eecf68e61b73 opw:2024652 closes odoo/odoo#34322 Signed-off-by: Simon Goffin (sig) --- addons/account/models/account_payment.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index e1dd00f035f..56d6a8a96d9 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -194,13 +194,11 @@ class account_register_payments(models.TransientModel): ''' amount = self._compute_payment_amount(invoices) if self.multi else self.amount payment_type = ('inbound' if amount > 0 else 'outbound') if self.multi else self.payment_type - communication = (' '.join([inv.reference or inv.number for inv in invoices]) - if self.multi else self.communication) return { 'journal_id': self.journal_id.id, 'payment_method_id': self.payment_method_id.id, 'payment_date': self.payment_date, - 'communication': communication, # DO NOT FORWARD PORT TO V12 OR ABOVE + 'communication': self.communication, # DO NOT FORWARD PORT TO V12 OR ABOVE 'invoice_ids': [(6, 0, invoices.ids)], 'payment_type': payment_type, 'amount': abs(amount),