Bank statement base import
account_statement_base_import · OCA/account-reconcile
-
Security25/25No findings
-
Activity0/25Last human commit 102 months ago
-
Required by20/252 modules depend on it
-
Maturity18/25In 3 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 19.0: only `__manifest__.py` is recognized: a module with `__openerp__.py` is not detected at all. migration-openerp-manifest · source
AccountStatementProfil— Class 'AccountStatementProfil' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceAccountStatementProfil— Class 'AccountStatementProfil' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. (2 occurrences in this file) migration-old-style-fields · sourceCreditPartnerStatementImporter— Class 'CreditPartnerStatementImporter' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceCreditPartnerStatementImporter— Class 'CreditPartnerStatementImporter' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcestatement_importer_view_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.tools.translate`) (3 occurrences in this file) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.addons.account_statement_base_import.parser.file_parser`) (2 occurrences in this file) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.tools.translate`) (2 occurrences in this file) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.tools.translate`) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) (2 occurrences in this file) migration-openerp-import · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module brings basic methods and fields on bank statement to deal with the importation of different bank and offices. A generic abstract method is defined and an example that gives you a basic way of importing bank statement through a standard file is provided.
This module improves the bank statement and allows you to import your bank
transactions with a standard .csv or .xls file (you'll find it in the 'data'
folder). It respects the profile (provided by the accouhnt_statement_ext
module) to pass the entries. That means, you'll have to choose a file format
for each profile.
In order to achieve this it uses the xlrd Python module which you will need
to install separately in your environment.
This module can handle a commission taken by the payment office and has the following format:
- ref: the SO number, INV number or any matching ref found. It'll be used as reference in the generated entries and will be useful for reconciliation process
- date: date of the payment
- amount: amount paid in the currency of the journal used in the importation profile
- label: the comunication given by the payment office, used as communication in the generated entries.
The goal is here to populate the statement lines of a bank statement with the infos that the bank or office give you. Fell free to inherit from this module to add your own format. Then, if you need to complete data from there, add your own account_statement_*_completion module and implement the needed rules.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
bank_statement_view_form |
account_bank_statement.bank_statement.view_form | account.bank.statement | form | Inherits account_statement_base_completion.bank_statement_view_form |
statement_importer_view |
credit.statement.import.config.view | credit.statement.import | form | New |
statement_importer_view_form |
account.statement.profile.view | account.statement.profile | form | Inherits account_statement_ext.statement_importer_view_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
No new fields.
Public methods (5)-
multi_statement_import(self, cr, uid, ids, profile_id, file_stream, ftype='csv', context=None)Create multiple bank statements from values given by the parser for the given profile. :param int/long profile_id: ID of the profile used to import the file :param filebuffer file_stream: binary of the providen file :param char: ftype represent the file exstension (csv by default) :return: list: list of ids of the created account.bank.statemênt -
prepare_statement_lines_vals(self, cr, uid, parser_vals, statement_id, context)Hook to build the values of a line from the parser returned values. At least it fullfill the statement_id. Overide it to add your own completion if needed. :param dict of vals from parser for account.bank.statement.line (called by parser.get_st_line_vals) :param int/long statement_id: ID of the concerned account.bank.statement :return: dict of vals that will be passed to create method of statement line. -
prepare_statement_vals(self, cr, uid, profile_id, result_row_list, parser, context=None)Hook to build the values of the statement from the parser and the profile. -
prepare_statetement_lines_vals(self, *args, **kwargs) -
write_logs_after_import(self, cr, uid, ids, statement_id, num_lines, context)Write the log in the logger :param int/long statement_id: ID of the concerned account.bank.statement :param int/long num_lines: Number of line that have been parsed :return: True
No new fields.
Public methods (3)-
default_get(self, cr, uid, fields, context=None) -
import_statement(self, cr, uid, req_id, context=None)This Function import credit card agency statement -
onchange_profile_id(self, cr, uid, ids, profile_id, context=None)
Loading…
Loading…