Romania - MT940 Bank Statements Import

l10n_ro_account_bank_statement_import_mt940_base
REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/19.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 0.4.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Dorin Hongu
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-reconcile:
    - account_statement_base
OCA/bank-statement-import:
    - account_statement_import_file
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
    - account_edi_ubl_cii
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
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.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/18.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 0.2.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Dorin Hongu
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-reconcile:
    - account_statement_base
OCA/bank-statement-import:
    - account_statement_import_file
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
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.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/17.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 0.3.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Dorin Hongu, Sima Elisabeta, stananatanaela
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-reconcile:
    - account_statement_base
OCA/bank-statement-import:
    - account_statement_import_file
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
Models touched (5)

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 (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.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/16.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 1.4.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSOCA-git-bot, Mihai Fekete, oca-ci, Dorin Hongu, danila12, Larisa-nexterp
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-reconcile:
    - account_statement_base
OCA/bank-statement-import:
    - account_statement_import_file
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
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.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/15.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Stana Natanaela
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/bank-statement-import:
    - account_statement_import
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
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.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_account_bank_statement_import_mt940_base
VERSION
VERSION 1.5.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania, Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania, Therp BV
COMMITTERS
COMMITTERSGitHub, OCA-git-bot, Mihai Fekete, oca-ci, Cojocaru Marcel, Dorin Hongu, Stana Natanaela
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/bank-statement-import:
    - account_statement_import
    - account_statement_import_base
OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ro
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_bank_form res.partner.bank.form res.partner.bank xpath Inherits l10n_ro_config.view_partner_bank_form
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.