The account-invoice module, in the case of a customer invoice, keeps the invoice report in a binary field during the first generation request, if the invoice is in “Posted” or “Paid” state.
This feature allows you to recover the original invoice when you request the report again (no new report generation).
In our case, we sometimes have to make corrections to the texts associated with the products (extended label, etc.). These texts are included on the invoice report.
But in the case of a correction on an invoice in “Posted” or “Paid” state (the customer notices an error during the processing of the invoice and asks us for a corrected version), it is no longer possible to generate a new updated invoice report document.
The system will retrieve the document saved in invoice_report_cache.
Our idea is to create a WIZARD to force the creation of a new version of the report by deleting the contents of invoice_report_cache. We could like that give specific rights to a group for the call of this WIZARD. This keeps the existing report recovery system backed up in case the report is requested again.
But we couldn’t find any trace of the reason for creating the invoice_report_cache system.
Do you have an idea of the risks associated with generating a new version of the invoice report in “Posted” and “Paid” status?
The main risk is to not be able to provide the exact same version as the one that was sent to the customer. In most countries the business must archive their invoices usually for at least 5 years and be able to give a an exact copy to the customer or the authorities.
I think such wizard should keep a copy of the previously archived record. And it should also create and store the new report directly, such in case of failure the original archive is kept (and not lost).
I guess such wizard could be in standard as long as it is limited to account administrator and user can still retrieve older archive.
In Germany 10 years and invoices must be invariably stored. No one ever should be allowed to change posted invoices. If an invoice was not correct it must be cancelled and recreated correctly.
If you change the invoice by some means how should be decided which is the valid one and legally binding? The first emitted, the second, the third? Allowing to change invoices opens a can of worms and I doubt strongly that it would be ever possible to get a certification for GoB according to German VAT law.