Bank Statement Import Generate Unique ID
account_statement_import_generate_unique_id · OCA/bank-statement-import
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Description
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 (<hash>,
<hash>-2, <hash>-3, ...), so they are all imported, while importing
the same statement again still ignores all of them.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_account_journal_form |
account.journal | form | Inherits account.view_account_journal_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
-
generate_unique_import_idBooleanhelp="Ensures that a unique_import_id is set on bank statement lines when importing them via bank statement import. If no unique identifier was provided, the value is a hash of the account number, date, payment reference, amount, reference and partner name. Identical transactions within the same import are numbered. Only lines imported after enabling this option get an ID; for existing lines without ID use the 'Generate for Existing Lines' button."string='Generate Missing Import IDs'
-
action_generate_unique_import_ids(self)Generate the unique_import_id of the existing statement lines which have none, the same way an import of all of them would