[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: c04065abd8

opw:2024652

closes odoo/odoo#34322

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
Goffin Simon
2019-06-24 11:29:08 +00:00
parent 49b949759f
commit 3d27337f6d
+1 -3
View File
@@ -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),