[FIX] account: do not copy paired internal transfer reference

Create an internal transfer and post it
The system will automatically create the paired payment
Now duplicate the transfer and post it
No paired payment will be created

This occurs because the field paired_internal_transfer_payment_id is
copied to the new record, linking the new intenal transfer to the old
paired payment, so the system will not create a new one

opw-2870995

closes odoo/odoo#94796

X-original-commit: 86a95de1aad3e27dabaf19d5deb4c14bdd87fa1f
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2022-06-29 12:19:45 +02:00
parent 857887805b
commit 5679a57877
+1 -1
View File
@@ -51,7 +51,7 @@ class AccountPayment(models.Model):
help="QR-code report URL to use to generate the QR-code to scan with a banking app to perform this payment.")
paired_internal_transfer_payment_id = fields.Many2one('account.payment',
help="When an internal transfer is posted, a paired payment is created. "
"They are cross referenced through this field")
"They are cross referenced through this field", copy=False)
# == Payment methods fields ==
payment_method_line_id = fields.Many2one('account.payment.method.line', string='Payment Method',