Access error for invoice with replaced party
The party that is replaced on the invoice may not have been created before the numbered_at. So accessing it will raise an access error about record does not exist.
See https://discuss.tryton.org/t/after-a-duplicate-party-is-deleted-i-get-you-try-to-read-records-that-dont-exist-anymore-document-type-party-party/2544
A possible solution would be to change the numbered_at but we will lose information.
Another option would be to *hack* the party read to use the replaced record.