The ‘ref’ field is not visible on invoices of type ‘out_invoice’.
In the tests, it is adding value to this field and therefore does not
fail to create a bank statement line where the ‘payment_ref’ field is
required. To solve this, the value of the ‘payment_ref’ field of the
bank statement lines is set as the reference of a supplier invoice
(‘ref’ in invoice lines) or as the reference of the payment
‘payment_reference’ (‘name’ in invoice lines).
It was renamed already in v14, so it must be this new name here, but it
was incorrectly migrated and merged. For keeping compatibility, a copy
is done instead.