OdooWiki OCA HUB

Account Lock To Date

account_lock_to_date folder_open OCA/account-financial-tools open_in_new
Uncategorised License: AGPL-3

This module allows to set a Period and Fiscal year Locking end dates. This will prevent users from posting journal entries on a date after the defined period or fiscal year end date.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets accounting managers set future lock dates for sales, purchases, global and hard locks, blocking posting or modifying journal entries on or after those dates.

This module adds future-dated locking to Odoo accounting. Accounting managers get a new menu item "Update accounting lock to dates" under the Accounting entries menu, which opens a small form where they can set a Sales Lock To Date, a Purchase Lock To Date, a Global Lock To Date and a Lock To Date (hard lock).

  • Sales and purchase lock dates block creating or changing entries in sales or purchase journals on or after the chosen date.
  • The Global Lock To Date blocks all users from editing accounts after that date, useful for fiscal year locking.
  • The hard lock works like the global lock but cannot be removed and cannot be bypassed by exceptions.

The module also extends the existing lock exceptions so that exceptions can be created for these new lock types. When a company's lock dates are changed, active exceptions are recreated automatically.

When a user tries to post, cancel or reset to draft a journal entry dated on or after a lock date, Odoo raises a validation error explaining which lock date was violated. The hard lock date cannot be removed and a new hard lock must be earlier than or equal to the previous one; also, draft entries in the period to be hard-locked must be posted or deleted first.

Depends on

account
Models and fields (4)
  • res.company · extends an existing modelhard_lock_to_date, sale_lock_to_date (Sales Lock To Date), purchase_lock_to_date, user_hard_lock_to_date, user_sale_lock_to_date, fiscalyear_lock_to_date (Global Lock To Date), user_purchase_lock_to_date, user_fiscalyear_lock_to_date
  • account.move · extends an existing model
  • account.lock_exception · extends an existing modellock_date_field, sale_lock_to_date (Sales Lock To Date), purchase_lock_to_date, fiscalyear_lock_to_date (Global Lock To Date)
  • account.update.lock_to_date · new modelcompany_id (Company), hard_lock_to_date (Lock To Date), sale_lock_to_date (Sales Lock To Date), purchase_lock_to_date, fiscalyear_lock_to_date (Global Lock To Date)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 7 confirmed, 2 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/account-financial-tools.

terminal Installation and usage

OCA documentation · Odoo 18.0

To set a new lock to dates, go to Invoicing / Accounting / Actions / Update accounting lock to dates.

A user without an Adviser group will not be able to post or update posted journal entries on the date "Lock To Date for Non-Advisers" or after.

A user that has an Adviser group will not be able to post or update posted journal entries on the date "Lock To Date" or after.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.