Skip to content
Health
100/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by25/25
    6 modules depend on it
  • Maturity25/25
    In 6 Odoo series since 14.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
6
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis 0 migration notes 4 models 1 view 0 HTTP endpoints

Description

This module provides a generic parser for MT940 files. Given that MT940 is a non-open non-standard of pure evil in the way that every bank cooks up its own interpretation of it, this addon alone won't help you much. It is rather intended to be used by other addons to implement the dialect specific to a certain bank.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 1

XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank form Inherits l10n_ro_config.view_partner_bank_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (33)
  • add_record_line(self, line, record_line)
  • get_codewords(self)
  • get_counterpart(self, transaction, subfield)
    Get counterpart from transaction. Counterpart is often stored in subfield of tag 86. The subfield can be BENM, ORDP, CNTP
  • get_footer_regex(self)
  • get_header_lines(self)
  • get_header_regex(self)
  • get_mt940_type(self)
  • get_subfield_split_text(self)
  • get_subfields(self, data, codewords)
    Return dictionary with value array for each codeword in data. For instance: data = /BENM//NAME/Kosten/REMI/Periode 01-10-2013 t/m 31-12-2013/ISDT/20 codewords = ['BENM', 'ADDR', 'NAME', 'CNTP', ISDT', 'REMI'] Then return subfields = { 'BENM': [], 'NAME': ['Kosten'], 'REMI': ['Periode 01-10-2013 t', 'm 31-12-2013'], 'ISDT': ['20'], }
  • get_tag_61_regex(self)
  • get_tag_regex(self)
  • handle_common_subfields(self, transaction, subfields)
    Deal with common functionality for tag 86 subfields.
  • handle_header(self, iterator, header_lines=None)
    skip header lines, create current statement
  • handle_record(self, line, result)
    find a function to handle the record represented by line
  • handle_tag_20(self, data, result)
    Contains unique ? message ID
  • handle_tag_25(self, data, result)
    Handle tag 25: local bank account information.
  • handle_tag_28(self, data, result)
    Sequence number within batch - normally only zeroes.
  • handle_tag_28C(self, data, result)
    Sequence number within batch - normally only zeroes.
  • handle_tag_60F(self, data, result)
    get start balance and currency
  • handle_tag_60M(self, data, result)
  • handle_tag_61(self, data, result)
    get transaction values
  • handle_tag_62F(self, data, result)
    Get ending balance, statement date and id. We use the date on the last 62F tag as statement date, as the date on the 60F record (previous end balance) might contain a date in a previous period. We generate the statement.id from the local_account and the end-date, this should normally be unique, provided there is a maximum of one statement per day. Depending on the bank, there might be multiple 62F tags in the import file. The last one counts.
  • handle_tag_62M(self, data, result)
  • handle_tag_64(self, data, result)
    get current balance in currency
  • handle_tag_65(self, data, result)
    get future balance in currency
  • handle_tag_86(self, data, result)
    details for previous transaction, here most differences between banks occur
  • is_footer(self, line)
    determine if a line is the footer of a statement
  • is_mt940(self, line)
    determine if a line is the header of a statement
  • is_mt940_statement(self, line)
    determine if line is the start of a statement
  • is_tag(self, line)
    determine if a line has a tag
  • parse(self, data, header_lines=None)
    Parse mt940 bank statement file contents.
  • parse_amount(self, sign, amount_str)
    Convert sign (C or D) and amount in string to signed amount (float).
  • pre_process_data(self, data)

New fields (1)
  • l10n_ro_unstructured_tag86 Text
    string='Romania - MT940 Unstructured Tag 86 Pattern'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…