OdooWiki OCA HUB

Account Bank Statement Cascade Delete

account_bank_statement_cascade_delete folder_open OCA/bank-statement-import open_in_new
Accounting License: AGPL-3

By default, in Odoo 16 and later, deleting an account.bank.statement will only remove the grouping, leaving the actual bank statement lines behind in the system (as they manifest as independent journal entries).

This module alters that behavior so that when you delete an account.bank.statement, it cascades the deletion to its included account.bank.statement.line records, effectively cleaning up both the statement and all of its associated lines off the database.

This is especially helpful for canceling and deleting incorrectly imported bank statements entirely.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

When you delete a bank statement in Odoo, this module also deletes all the bank statement lines that belonged to it, instead of leaving them behind as separate journal entries.

In standard Odoo, deleting a bank statement only removes the statement grouping; the individual bank statement lines stay in the system as independent journal entries. This module changes that behaviour.

  • When a user deletes an account.bank.statement, the module first collects all the related bank statement lines (line_ids) and then removes them as well, so both the statement and its lines are cleaned up together.
  • This is useful when an incorrect bank statement was imported and you want to cancel and remove it completely, without leftover entries cluttering the accounting.
  • The change applies to the account.bank.statement model and is triggered by the standard delete action; no new menus, buttons, reports or settings are added.
  • No new fields, checks, default values, emails or scheduled jobs are introduced by the code.

The module only extends the deletion behaviour of bank statements; everything else in the Accounting app stays the same.

Depends on

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

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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/bank-statement-import.

terminal Installation and usage

OCA documentation · Odoo 18.0

To use this module, simply:

  • Go to Accounting > Dashboard.
  • Click on the three dots menu of a bank journal.
  • Go to Operations > Statements.
  • Select a statement and click Action > Delete.

The statement and all its lines will be deleted together.

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.