Merge PR #1166 into 16.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2023-11-05 10:23:34 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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,