Odoo 19 Lock Date: Fix a Posted Invoice in a Closed Period

In Odoo 19 a lock date blocks reset to draft on a posted invoice dated inside a closed period, and the clean fix is a credit note and a new invoice dated in the open period. You do not move the lock date back to make the edit, because the lock exists so that reported figures stay stable.
This works the same way in Odoo 18. The steps below apply to both versions.
Why can't I reset a posted invoice to draft in Odoo 19?
Because the invoice date falls on or before a lock date. Odoo refuses any change that would alter journal entries in a locked period, and resetting to draft is one of those changes.
The client usually sees this as a plain error message when someone clicks Reset to Draft or tries to edit the invoice. Nothing is broken. The system is doing what the accountant asked it to do when the period was closed.
Which lock dates exist, and what does each one block?
Odoo has several lock dates, and they do different jobs. Knowing which one fired tells you what the client can still do.
- Sales lock date: blocks changes to entries in sales journals up to that date.
- Purchase lock date: the same for purchase journals.
- Tax lock date: blocks changes that would alter tax amounts already reported.
- Global lock date: blocks changes to any journal entry up to that date. It binds all users. It is bypassed only by a lock date exception.
- Hard lock date: cannot be moved back once set, and no exception bypasses it.
A lock date exception is a temporary, recorded permission for a specific user or for everyone, for a limited time. It is the tool for a one-off correction when the client's accountant agrees.
What is the clean fix for a wrong posted invoice in a closed period?
Reverse it with a credit note dated in the open period, then issue a new, correct invoice, also dated in the open period. The original entry stays untouched, the correction is visible, and the closed period's figures do not change.
- On the invoice, click Credit Note, set the reversal date in the open period, and click Reverse.
- Check the credit note and post it. It cancels the original invoice's receivable and revenue lines.
- Reconcile the credit note with the original invoice so the customer balance clears.
- Create the corrected invoice with an invoice date in the open period and post it.
- Send the customer the credit note and the new invoice together, with one sentence explaining the correction.
The reversal date matters. If you leave the default date and it falls in the locked period, Odoo will block the credit note as well.
Should I just move the lock date back?
Usually no. Moving a global or tax lock date back reopens a period the accountant has already reported on. Anyone could then post into it, and the figures filed with the tax authority would no longer match the books.
If the client's accountant explicitly wants an entry inside the closed period, use a lock date exception instead of changing the date. It is limited in time, tied to a reason, and visible afterward. A hard lock date cannot be moved back at all, so the credit note route is the only one there.
What does this look like on a real project?
A distributor invoices a customer in September for 40 units at the wrong unit price. The accountant closed September on October 5 with a tax lock date and a global lock date. On October 20 the customer disputes the price, and the junior consultant on the project clicks Reset to Draft to change it. Odoo gets the lock date error.
The consultant's first instinct is to ask the accountant to move the lock date back. A better answer is the following:
- Create a credit note from the September invoice and set the reversal date to October 20.
- Post it and reconcile it with the original invoice.
- Create a new invoice for 40 units at the correct price, dated October 20, and post it.
September's reported figures stay exactly as filed. October carries both the reversal and the corrected sale, and the audit trail shows what happened and why. The tax effect of the difference lands in the October return, which is where the accountant expects it.
What should I check before telling the client it is done?
- The credit note and the new invoice are both posted and dated in the open period.
- The customer balance in the receivable report matches what the customer owes now.
- If the original invoice had a payment, decide with the accountant whether it should be reapplied to the new invoice.
- Stock moves and cost of goods sold are unchanged unless goods were returned. A price correction does not touch them.
- If the correction needed a lock date exception, confirm it has expired.
If you are also learning how purchase documents are matched before they are paid, the same logic of correcting forward instead of rewriting history applies. See how a three-way match works in Odoo Purchase.
How do I practice this?
Set up a test database, post an invoice, set a lock date after it, and try three things: reset to draft, reverse with the default date, and reverse with a date in the open period. Then add a lock date exception and see what changes. Doing it once by hand is worth more than reading about it twice.
Review brings back the questions you got wrong first and right later, so revision targets weak spots instead of a grind: https://www.praxio.pro/app/review
Ready to start practicing?
Take the free Consultant Readiness Assessment and find out where you stand across five consulting dimensions.
Take the Free Assessment →