A posted invoice whose amount changes a week later is one of the most common problems in accounting. Backdated changes disrupt tax returns, financial reports and trust in your data. That is why it is worth knowing how to lock posted documents from editing in Odoo before someone accidentally changes a closed period. In this guide, we show the mechanisms available in Odoo 19: lock dates with exceptions, journal entry protection (hashing) and user access restrictions.
If you want to check the settings described below on your own database, use the free Odoo trial.
Why should you protect posted documents?
A posted document is the basis for settlements with the tax office, business partners and auditors. Any later change can have serious consequences:
- discrepancies between the VAT return and the records in the system,
- a change in the financial result for a period that has already been approved,
- no way to trace who modified the data and when,
- problems during an inspection or an audit of the financial statements.
Odoo offers several layers of protection. It is best to combine them rather than rely on a single setting.
How does editing posted documents work in Odoo?
Once posted, an invoice or journal entry moves from draft to posted status. In this state, key fields such as amounts, accounts, partner or accounting date are locked for editing. To change anything, the user must first use the Reset to Draft action. This operation is only possible when it is not blocked by other safeguards: a lock date covering the accounting date, or hash protection enabled on the journal. These are the mechanisms that let you effectively lock posted documents from editing across entire accounting periods.
Lock dates in the Accounting app
The most important tool is lock dates. You can set them in the Accounting app, in the section dedicated to lock dates (Lock Dates), available to users with accounting manager access rights. A lock covers all entries dated no later than the specified date. The exact names of menu items may differ slightly depending on the localization and translation, so it is worth verifying them in the Odoo 19 documentation.
Fiscal Year Lock
This lock closes the period for all users: you cannot post, edit or delete entries dated no later than the specified date. It is used after closing a month or a year. If it later turns out that a correction is needed, it can be made using a lock exception (described below), without changing the date itself.
Sales and Purchase Locks
Separate lock dates for sales and for purchases let you close documents from a specific area earlier than the rest of the accounting. For example, when sales invoices are already settled but accrual entries and exchange rate differences are still being reconciled, the sales lock can be set earlier.
Tax Return Lock
The tax return lock protects entries that affect a tax return. As a result, after submitting the JPK_VAT or a tax return, nobody can change the documents that fed into it. Odoo then does not allow changes to tax-affected entries in the closed period.
Hard Lock
The strongest safeguard is the Hard Lock. It is final: once it is set, nobody, not even an administrator, can edit entries in the locked period, and the date can only be moved forward, never backward. Set it only after the year has been closed, the financial statements approved and all reconciliations completed.
Lock exceptions
In Odoo 19, you do not need to roll back the lock date to make a single correction. A user with the appropriate access rights can create a lock exception: temporary, assigned to a selected user or to everyone, with a stated reason. The exception is recorded in the history, so you keep a full audit trail. Exceptions do not apply to the hard lock.
Effective lock date configuration requires an understanding of the processes in your company. If you are not sure how to combine the individual locks with your closing and tax filing calendar, our consultants will help you choose settings that fit the way your accounting department works.
Journal entry protection (hash)
The second layer of protection is a setting at the journal level. In the journal's advanced settings tab, you can enable the option to secure posted entries with a hash. Odoo then stores a cryptographic hash of each journal entry, linked to the previous entry in the journal. Once it is enabled, posted entries cannot be reset to draft, and any attempt to change protected fields results in an error. You can verify data integrity in the Data Inalterability Check report available in the Accounting app.
Note that this option works per journal. It is worth considering which journals, e.g. sales and purchases, require this level of protection. In some localizations (e.g. France), hashing is required by law. Once the first entries are posted, changing this configuration is restricted, so test it first on a test database.
User permissions as a complement
Even the best lock dates will not replace a well-thought-out access model. A user who has no access rights to the Accounting app, or who sees only selected documents, is less likely to make an accidental change. It is worth limiting the permissions to manage locks and exceptions to a small group of people with the accounting manager role. Our guides will help:
- creating custom access groups in Odoo lets you separate accountant roles from regular users,
- restricting access to menus hides sensitive sections from people who do not need them,
- configuring report permissions controls who can see financial statements.
Change tracking and audit
Locks prevent changes, but it is just as important to be able to check who tried to modify something and when. In Odoo, this is supported by the message history (chatter) on documents, which shows changes to tracked fields as well as lock exceptions that were created. You will find more details in the article on user activity auditing.
Recommended plan for implementing safeguards
- Define roles: who posts, who approves, and who has the right to make corrections and manage locks.
- Enable hash protection on key journals, first on a test database.
- After closing the month, set the sales and purchase locks.
- After filing the tax return, set the tax return lock.
- After closing the annual period, set the fiscal year lock and make corrections through lock exceptions.
- After the financial statements are approved, consider the hard lock.
- Regularly review the change history and user permissions.
With this approach, it is easier to lock posted documents from editing without hindering the team's day-to-day work.
Want to see what lock date configuration looks like in practice? Try it yourself in a free Odoo database.
Most common mistakes when locking documents
- Setting the hard lock too early. Setting it before reconciliations are finished prevents later corrections, and it cannot be undone.
- No testing. Changes to journals and lock dates should first be checked on a copy of the database.
- Overly broad permissions. If every user can manage locks and exceptions, the safeguards lose their purpose.
- No correction procedure. Instead of editing a closed period, use credit notes or reversal entries in the current period, or a controlled lock exception.
FAQ – frequently asked questions
Can I unlock a posted document in Odoo?
Yes, as long as it is not blocked by a lock date or journal hash protection. A user with the appropriate access rights can reset the document to draft. If the period is covered by a lock, you can create a lock exception or change the lock date, which is available only to authorized roles. With the hard lock, the period remains closed permanently.
What is the difference between the fiscal year lock and the hard lock?
The fiscal year lock can be bypassed in a controlled way by creating an exception with a stated reason, and its date can be changed. The hard lock is irreversible: exceptions do not apply to it, and it can only be moved forward. It is used after the final closing of a period.
How do I fix an error in a closed period?
The safest approach is to enter a correcting document, e.g. a credit note or an adjusting entry, in the current, open period. This way you maintain the continuity of records and a full audit trail. If the correction must go into a closed period, use a lock exception.
Summary
To effectively lock posted documents from editing, combine lock dates (with exceptions instead of rolling back dates), journal entry hash protection, well-designed permissions and change auditing. This approach increases the security of financial data and makes inspections and audits easier.
Need help implementing or optimizing Odoo in your company? Contact the KK Innovations team, and we will choose a configuration tailored to your accounting processes.