[FIX] account_payment_order: create lines with same sequence name

This commit is contained in:
Reyes4711
2023-04-05 17:44:47 +02:00
parent ac88c4460b
commit 594a3e4fa6

View File

@@ -192,6 +192,9 @@ class AccountPaymentLine(models.Model):
"date": self[:1].date,
"currency_id": self.currency_id.id,
"ref": self.order_id.name,
# 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]),
"journal_id": journal.id,
"partner_bank_id": self.partner_bank_id.id,