Technical
Odoo Lock Dates: Journal, Tax Return and Hard Locks Explained
How Odoo's lock dates protect closed periods, why backdated entries cause real damage, when reopening a period is acceptable, and how to keep a clean audit trail of every correction.
Kalvyai Engineering · · 7 min read

On this page
Once a month or quarter is closed, its numbers should stop moving. Reports have been sent, tax returns filed, and decisions made on those figures. Odoo's lock dates enforce this. This post covers what each lock date does, why backdated entries cause damage, when it is reasonable to correct a closed period, and how to keep a record of every correction.
Lock date behavior has changed across Odoo versions. The field names and menus below follow recent releases. Confirm the details against the version you run before changing settings in production.
The lock dates in Odoo
Odoo stores lock dates on the company. Each one blocks posting, editing or deleting journal entries dated on or before that date, for a defined scope.
To open them, go to Accounting > Accounting > Lock Dates in recent versions, or Accounting > Configuration > Settings in older ones.
Journal lock dates
In older versions this was one field, often called the lock date for non-advisers. Users without the accounting adviser role could not post before it, but advisers could. It was a soft lock for day-to-day users while accountants finished the close.
In more recent versions it is split by journal type, with separate sales and purchase lock dates (sale_lock_date and purchase_lock_date on res.company). This lets you close sales for the month while purchase bills for the same month are still arriving.
Tax return lock date
The tax return lock date (tax_lock_date) stops changes to entries that affect tax amounts on or before that date. Entries without tax lines may still be allowed. It protects figures you have already reported to the tax authority.
In recent versions Odoo can move this date forward when you close a tax return period. If a user creates an invoice dated inside a tax-locked period, Odoo may move the accounting date to the first open date and warn the user, instead of blocking the invoice.
Global (all users) lock date
The global or fiscal year lock date (fiscalyear_lock_date) applies to everyone, advisers included. You set it once a period is fully closed and reviewed.
It can still be moved back by someone with the right access rights. That is useful for genuine corrections, and it is also why you need the controls described later in this post.
Hard lock date
The hard lock date (hard_lock_date) is the strictest. Once set, it cannot be moved earlier, and no exception can override it. Use it for periods that have been audited or formally filed, where no change should ever be possible inside the system.
Because it cannot be reversed, set it deliberately. Agree on the date with your accountant or auditor first.
Exceptions
Recent versions let an authorized user grant a temporary exception to a soft lock. It can apply to a single user or to everyone, for a limited duration, and it records a reason. This is better than moving the lock date back and forgetting to restore it, because the exception expires and leaves a record.
Summary
Lock | Who it blocks | Can be overridden |
|---|---|---|
Journal (sales / purchase) | Users per version rules | Yes, by authorized users or exceptions |
Tax return | Entries affecting tax | Yes, with care |
Global | All users | Yes, by moving the date or an exception |
Hard | Everyone | No |
Why backdated entries are dangerous
A backdated entry is one posted today with a date in an earlier period. Sometimes this is correct: a supplier bill for March arrives on 2 April and March is still open. The trouble starts when the earlier period has already been reported.
Reports stop matching what was filed
If March was reported to the bank, the board or the tax authority, and someone later posts a March entry, Odoo's March balance sheet no longer matches the copy that was sent. Nobody notices until someone reconciles the two, usually at year end or during an audit.
Tax returns go out of sync
A backdated invoice with tax changes the tax report for a period you already filed. You now owe or are owed a different amount than you declared, and the system will not tell you unless you compare the reports.
Inventory valuation shifts
With automated stock valuation, backdated stock moves or bills can change the cost of goods sold and inventory value for closed periods. Average cost calculations can also shift for later transactions.
Reconciliations break
Bank reconciliations, intercompany balances and customer statements that were agreed at period end can change without anyone touching them directly.
Trust in the numbers drops
The biggest cost is indirect. Once people find that last quarter's numbers change silently, they start keeping their own spreadsheets, and the ERP stops being the single source of truth.
Finding backdated entries
You can spot entries posted well after their accounting date by comparing date with create_date on account_move. This read-only query lists posted entries created more than 30 days after their accounting date:
SELECT am.name,
am.date AS accounting_date,
am.create_date::date AS created_on,
(am.create_date::date - am.date) AS days_late,
rp.name AS created_by
FROM account_move am
JOIN res_users ru ON ru.id = am.create_uid
JOIN res_partner rp ON rp.id = ru.partner_id
WHERE am.state = 'posted'
AND am.create_date::date - am.date > 30
ORDER BY days_late DESC;Adjust the threshold to suit your close cycle. Run it against a copy of the database or a read-only user, never as a write-capable superuser on production.
If you prefer the API, you can read the current lock dates over XML-RPC:
import xmlrpc.client
url = "https://your-odoo.example.com"
db, user, key = "your_db", "user@example.com", "API_KEY"
common = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/common")
uid = common.authenticate(db, user, key, {})
models = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/object")
# Field names vary by version; remove any that do not exist in yours.
fields = ["name", "sale_lock_date", "purchase_lock_date",
"tax_lock_date", "fiscalyear_lock_date", "hard_lock_date"]
for company in models.execute_kw(db, uid, key, "res.company", "read",
[[1]], {"fields": fields}):
print(company)A scheduled check that alerts the finance lead when a lock date moves backwards is a cheap and useful control.
When correcting a closed period is acceptable
Changing a closed period is not always wrong. It is acceptable when all of these hold:
- The error is material. It affects a filed return, a lender report or the statutory accounts in a way that matters. Small classification errors can usually be fixed in the current period.
- The period has not been audited or hard-locked. If an auditor has signed off, the correction normally goes into the current period with a disclosure, not back into the audited one. Ask your auditor.
- Your accountant agrees on the treatment. Some errors must be restated in the original period, others are corrected prospectively. This is an accounting decision, not an ERP decision.
- Any affected tax return can be amended. If the correction changes tax, you need a plan for the amended filing.
- Someone other than the person making the change approves it.
If any of these fail, record the correction in the current open period instead and reference the original entry.
How to correct a closed period step by step
- Write down the reason. Original entry number, what is wrong, the amount, and who approved the correction.
- Prefer reversal over editing. Use the reverse action on the original entry (or a credit note for invoices) rather than resetting it to draft and editing it. The original stays visible, and the reversal shows exactly what changed.
- Choose the date carefully. Date the reversal and the corrected entry in the original period only if the approval in the previous section covers it. Otherwise date both in the current period.
- Open the lock narrowly. Use a time-limited exception for the specific user where your version supports it. If you must move a lock date back, move it only as far as needed.
- Post the correction with a reference that links to the original entry and the approval.
- Restore the lock immediately. If you moved a date, put it back. Exceptions should expire on their own.
- Rerun the affected reports (trial balance, tax report, aged balances) and compare them with what was previously filed.
- File amendments where needed, and attach the evidence to the journal entries.
Keeping an audit trail of corrections
A correction you cannot explain a year later is nearly as bad as the original error. Build the trail in layers.
Use Odoo's built-in logging
- Chatter on journal entries records posting, reset to draft and tracked field changes. Encourage users to add a note explaining each correction.
- Audit trail setting. Recent versions include an accounting audit trail option that logs changes to posted entries and restricts deleting them.
- Hash-locked journals. Journals can be configured to secure posted entries with a hash, and Odoo provides a data inalterability check report.
- Lock exceptions in recent versions are stored with user, scope, duration and reason.
Add a correction log
Keep a simple register outside the entries themselves, either as a custom model in Odoo or a controlled shared document. For each correction, record:
Correction ID : CORR-2025-014
Original entry : INV/2025/00312
Period affected : 2025-03
Reason : VAT rate applied at 5% instead of 12%
Correction entries: RINV/2025/00041, INV/2025/00498
Lock action : 15-minute exception for one user
Approved by : Finance Manager
Tax amendment : Filed / Not requiredRestrict who can unlock
Limit lock date changes to a small group, usually the finance manager and one backup. Review that group's membership every quarter. Review the lock date history and exception list as part of each month-end close.
A practical monthly routine
- Day 3 after month end: set the sales and purchase lock dates once invoicing and bills are complete.
- After filing tax: confirm the tax return lock date has moved to the end of the filed period.
- After management review: set the global lock date.
- After the annual audit: set the hard lock date to the audited year end.
- Every month: run the backdated entry query and review any lock exceptions.
Adjust the timing to your own close calendar.
Recording operations on their real date
Lock dates protect closed periods, but teams often need the opposite inside open ones: entering a delivery or bill on the date it actually happened rather than today. Our Backdate in Odoo app lets authorized users set back dates on sales, purchases, invoices, stock and manufacturing. Use it together with well-maintained lock dates and restricted user groups, so backdating stays within open periods and stays controlled.
How Kalvyai can help
We configure Odoo accounting controls for teams that want clean closes: lock date policies, restricted unlock rights, backdated entry alerts, correction logs and approval flows. When AI agents work in your Odoo, we set them up with human approvals, budgets and an audit trail, so automation never posts into a closed period unnoticed. See our Odoo services, browse our apps at store.kalvyai.com, or contact us to review your period close setup.
- Odoo
- Odoo Accounting
- Lock Dates
- Period Close
- Audit Trail
- ERP Controls
Kalvyai Engineering · Engineering team
The engineers who build, connect and fix business systems at Kalvyai: Odoo, ERPNext, Shopify and AI agents that work inside them with approvals, budgets and an audit trail.



Comments
No comments yet. Questions and corrections are welcome.
Rate this post or leave a comment