OdooWiki OCA HUB

Bank Statement Import Generate Unique ID

account_statement_import_generate_unique_id folder_open OCA/bank-statement-import open_in_new
Accounting License: LGPL-3

Some bank statement sources (e.g. some CSV/sheet exports or camt files) do not provide a unique identifier for their transactions. Without it, importing an overlapping period creates duplicate statement lines.

This module adds an option on bank journals to generate a unique_import_id for statement lines that come without one. The value is a SHA-256 hash of the normalized account number, date, payment reference, amount, reference and partner name. An identifier provided by the source always takes priority.

Identical transactions within the same import are numbered (, -2, -3, ...), so they are all imported, while importing the same statement again still ignores all of them.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds an option on bank journals so imported bank statement lines without a source identifier still get a unique import ID, preventing the same transactions from being imported twice.

This module helps accountants who import bank statements from sources that do not provide a transaction identifier. Without one, importing an overlapping period can create duplicate statement lines.

On a bank journal's configuration form, a new checkbox "Generate Missing Import IDs" appears (only for bank journals). When it is enabled, every statement line imported afterwards that has no identifier from the source receives a generated one. The value is a fingerprint built from the account number, date, payment reference, amount, reference and partner name, so the same transaction always produces the same fingerprint. If the source does provide an identifier, that one is kept.

  • Identical transactions inside the same import are numbered (for example with a -2, -3 suffix), so they are all imported, while re-importing the same statement still ignores them.
  • Only lines imported after enabling the option get an ID automatically.

Next to the checkbox there is a "Generate for Existing Lines" button. It fills in an ID for all existing statement lines of that journal that have none, using the same logic as an import. A confirmation is asked first. Afterwards a notification tells how many lines received an ID and how many were skipped because their ID is already used by another line (possible duplicates).

The module extends the bank journal settings and works together with the bank statement import. It does not add menus of its own.

Models and fields (1)
  • account.journal · extends an existing modelgenerate_unique_import_id (Generate Missing Import IDs)

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

Go to Invoicing > Configuration > Journals, open a bank journal and enable Generate Missing Import IDs.

Only statement lines imported after enabling the option get a generated import ID. To set it for the existing statement lines of the journal that have none, click Generate for Existing Lines next to the option. Lines whose generated import ID is already used by another line are skipped and reported, as they may be duplicates. Check them manually.

Only enable this option for journals whose source provides no transaction identifier.

Identical transactions (same account number, date, payment reference, amount, reference and partner name) can only be told apart within the same import. If an import ends between two identical transactions of the same day, the second one gets the same identifier in the next import and is ignored as already imported. Therefore always import complete days, and do not enable this option when such identical transactions are common and statements may cover partial days.

No verified information in OCA: Installation.

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.