How to Undo an Incorrect Hard Lock Date in Odoo · Calibre Consulting

Fix a wrong hard lock date in Odoo without undoing it.

Odoo will not remove or move back a hard lock date. Here is what the lock blocks, who can change it, and how to correct a locked year.

This guide is for anyone who set a hard lock date in Odoo on the wrong date, for example by locking a whole fiscal year before the auditors had finished with it. The short answer: Odoo does not let anyone remove a hard lock date or move it to an earlier date, from any screen, import or automated action. It can only be moved later. What you can do is record the correction in the first open period, or, if entries really must carry a date inside the locked period, go back to a copy of the database taken before the lock was saved.

It is written for accountants, controllers and owners who handle period closing. The behavior was verified in the Odoo 19 source code, and Odoo 20 applies the same rules.

Before you start

What the hard lock blocks and allows

Once a hard lock date is saved, every journal entry dated on or before it is frozen. In practice:

The one change that is still allowed is moving the hard lock date later. An Accounting Administrator can do that in the Lock Dates window, as long as the new date is not in the future.

Why it cannot be removed or moved back

Odoo checks the rule in two places. The Lock Dates window refuses to save a hard lock that is blank or earlier than the current one. Behind that window, the company record runs its own check every time anything tries to change the lock, and rejects a blank or earlier date with an error. That second check applies to every user, administrators included, and to anything that writes data through Odoo, such as a scheduled action, a server action or an import.

So clearing the date with a scheduled action does not work: the action reaches the same check and fails. Only an edit made directly in the database, outside Odoo, would get past it. That defeats the purpose of the lock, which exists to show that closed periods were never touched and in some countries is part of meeting legal accounting requirements. A change made that way would also bypass Odoo's own record of who changed the lock and when. Treat it as off the table.

How to correct entries in a locked period

Option 1: record the correction in the open period. This keeps the locked period intact and leaves a visible trail.

  1. Open the Accounting app and find the wrong document, for example under Customers > Invoices.
  2. For a customer invoice or vendor bill, click Credit Note. For a manual journal entry, click Reverse Entry. A window opens with a Reversal date, which defaults to today.
  3. Keep the reversal date in an open period and click Reverse. Odoo creates the reversing document and opens it. A reversed journal entry is posted straight away; a credit note opens in draft, so check it and click Confirm.
  4. Enter the corrected invoice, bill or journal entry. If you give it a date inside the locked period, Odoo moves its Accounting Date to the first open date, as described above.

How a prior-year correction should be presented in your statements, for example as an adjustment to opening retained earnings, is an accounting decision to make with your accountant. Odoo only requires that the entry sits after the lock.

Option 2: return to a copy taken before the lock. If the corrections must be dated inside the locked period, the only route that keeps Odoo's controls in place is a database copy from before the hard lock was saved. Anything recorded after that copy was made would need to be entered again. To find the right copy, check when the lock was set: the company record keeps a history of changes to its Hard Lock Date.

Check that it worked

  1. Open the Accounting app and go to Accounting > Closing > Lock Dates. The Lock Journal Entries window opens. The Hard Lock field, in the red box at the bottom, shows the current date.
  2. To see when it was set and by whom, open the Settings app, go to Users & Companies > Companies and open your company. The message history on the right lists each change to the Hard Lock Date with its date and author.
  3. After posting a correction, open it and confirm that its date falls after the hard lock. A customer invoice shows an Accounting Date field when that date differs from the invoice date.

Avoid the same mistake next time

Steps verified on Odoo 19. Menus and labels can differ on other versions.

Common questions

Can an administrator remove a hard lock date in Odoo?

No. In Odoo 19 and 20 the company record rejects a blank or earlier hard lock date for every user, administrators included. The only allowed change is moving it to a later date that is not in the future.

Can a scheduled action or server action clear the hard lock date?

No. Scheduled and server actions save data through Odoo, so they run into the same check as the Lock Dates window and stop with an error. Only a direct database edit gets around it, which defeats the purpose of the lock.

Can I grant a lock date exception for the hard lock date?

No. Exceptions only apply to the soft lock dates, such as Lock Everything, Lock Sales, Lock Purchases and Lock Tax Return. The hard lock allows none.

What happens if I post an invoice dated in a hard-locked period?

Odoo still posts it but keeps it out of the locked period: the invoice date stays as entered and the Accounting Date moves to the first open date. The form shows a notice with that date before you post.

Who can set or move the hard lock date in Odoo?

Users whose Accounting access is set to Administrator. They change it in the Accounting app under Accounting > Closing > Lock Dates, and only to a later date that is not in the future.

Talk to the team.

If you are setting this up, or Odoo is not behaving the way this guide describes, book a 30-minute call. We will look at your configuration and tell you what it needs. Calgary studio, in-house team, no offshore handoffs.

Book the call →