We made the reference field required for supplier invoices if they are in posted state. Every supplier invoice should have a reference set. This way you can prevent that somebody is missing to enter it.
So we keep it readonly for customer invoices if the report cache is the reason why it is readonly.
Indeed this will be a good solution which will prevent the issue. I can not imagine any case where the supplier invoice should not have a reference, as you always have the supplier number to be used as reference.
An employee expense should not be booked using an invoice but using directly an account move.
You can have a move template for that.
Also we have Expense reimbursement. Even on the first post of this topic you say:
Why it is not required? When you book an invoice you must identify it, so this means including the supplier invoice number on the reference. Otherwise it is not possible to identify exactly the invoice.
Unfortunately I found one (weak) argument to not make it required. One could argument that the reference is not need if the document that is the base for the supplier invoice is attached to the record as an attachment. On the other hand IMHO it may be still good practice to enter a reference even for this case.
Which is the problem with self invoice? The customer creates the invoice and this invoice will have a number, so this number can be used as reference when encoded as supplier invoice.
Do not understand. If the commissionrt is a supplier and should invoice you, you can not know the invoice date in advance. So you can not post it until the final invoice is send by the commissioner with the right invoice date.
Of course but the binary content is not searchable, so you can not identify the invoice if you do not see the reference. Also, we can not guarantee that an attachment is the document representing the invoice, one can attach any document that is not unrelated.
Indeed I recomend to everyone to do both process: Set the reference and attach the invoice as attachment. But the attachment may be a mather of taste.
We do usually as @timitos and define reference field required for posting supplier invoices.
Note that in Spain the reference cannot be modified for supplier posted invoices because it is the identification of invoice in SII web portal, so if reference changes the invoice is manage as a new different invoice.
For me this feature is not really support yet. The invoice should be marked as a self billing case as the invoice report of an outgoing invoice must not be used and the invoice report of the customer needs to be used/stored instead. And if this marker has been added the states for the reference field could be adapted for these cases.
On the legal level sending out the local invoice report for such a self billing case could result in an additional sales tax demand as there would be two documents that declare taxes then.
The reference field can be made editable for any state but only if the invoice report is not cached.
When the feature to refresh cache is implemented it may be good to be able to change its content during the procedure.
The reference can not be made required (for self-invoice like commission).