OdooWiki OCA HUB

Account Account Constraint Code

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

Disallow the modification of the code of accounts that have journal items.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Prevents changing the code of an account once it has journal items, protecting accounting consistency.

This module adds a control on accounting accounts. When a user tries to change the code of an account that already has at least one journal item (a line in an accounting entry), Odoo blocks the change and shows an error message.

  • The rule applies to the account.account model and checks the account.move.line model.
  • It is triggered automatically whenever the code field is modified.
  • If any journal item is linked to the account, the modification is rejected with the message: "You cannot change the code of account which contains journal items."
  • No new menus, screens, or reports are added; the change is only a validation constraint.

This helps keep the audit trail consistent by preventing account codes from being altered after they have been used in transactions.

Depends on

account
Models and fields (1)
  • account.account · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 14.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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 14.0

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

terminal Installation and usage

OCA documentation · Odoo 14.0

No configuation needed, effective after install

No verified information in OCA: Installation, Usage.

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.