From 7edd69ca78250f94139bcf3d3f38171bad0f2d41 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sat, 4 Nov 2023 16:41:50 +0100 Subject: [PATCH] [IMP]grouped invoices: " - ".join in stead of "-".join --- account_banking_sepa_credit_transfer/tests/test_sct.py | 4 ++-- account_payment_order/models/account_payment_line.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/account_banking_sepa_credit_transfer/tests/test_sct.py b/account_banking_sepa_credit_transfer/tests/test_sct.py index 2914e0e19..413dc9137 100644 --- a/account_banking_sepa_credit_transfer/tests/test_sct.py +++ b/account_banking_sepa_credit_transfer/tests/test_sct.py @@ -219,7 +219,7 @@ class TestSCT(TransactionCase): ), 0, ) - self.assertEqual(agrolait_bank_line.payment_reference, "F1341-F1342-A1301") + self.assertEqual(agrolait_bank_line.payment_reference, "F1341 - F1342 - A1301") self.assertEqual(agrolait_bank_line.partner_bank_id, invoice1.partner_bank_id) action = self.payment_order.open2generated() @@ -305,7 +305,7 @@ class TestSCT(TransactionCase): asus_bank_line.currency_id.compare_amounts(asus_bank_line.amount, 3054.0), 0, ) - self.assertEqual(asus_bank_line.payment_reference, "Inv9032-Inv9033") + self.assertEqual(asus_bank_line.payment_reference, "Inv9032 - Inv9033") self.assertEqual(asus_bank_line.partner_bank_id, invoice1.partner_bank_id) action = self.payment_order.open2generated() diff --git a/account_payment_order/models/account_payment_line.py b/account_payment_order/models/account_payment_line.py index 25061e21a..6fdf98853 100644 --- a/account_payment_order/models/account_payment_line.py +++ b/account_payment_order/models/account_payment_line.py @@ -198,7 +198,7 @@ class AccountPaymentLine(models.Model): # Put the name as the wildcard for forcing a unique name. If not, Odoo gets # the sequence for all the payment at the same time "name": "/", - "payment_reference": "-".join([line.communication for line in self]), + "payment_reference": " - ".join([line.communication for line in self]), "journal_id": journal.id, "partner_bank_id": self.partner_bank_id.id, "payment_order_id": self.order_id.id,