TIP: You can type at any time to perform a new search.
Journal Entry base import
account_move_base_import · OCA/account-reconcile
- Repository
- OCA/account-reconcile · module folder · Try on Runboat
- Module version
- 1.0.3
- Category
- Finance
- Folder size
- 1.76 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/account-reconcile
- Last tracking update
- 2026-08-07 08:43:01
- Authors
- Camptocamp, Akretion, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Akretion, Odoo Community Association (OCA)
- Committers
- Ricardoalso, Maksym Yankin, Weblate, OCA-git-bot, oca-ci, Bhavesh Heliconia
- Odoo dependencies
- Python dependencies
- xlrd
- System dependencies
- None
- Required by
- None
- Description
This module is a grouping of 7.0/8.0 modules, used to import accounting files and completing them automatically: - account_statement_base_completion - account_statement_base_import - account_statement_commission - account_statement_ext The main change is that, in order to import financial data, this information is now imported directly as a Journal Entry. Most of the information present in the "statement profile" is now located in the account journal (with 2 boolean parameters which allows to use this journal for importation and/or auto-completion). Financial data can be imported using a standard .csv or .xls file (you'll find it in the 'data' folder). It respects the journal to pass the entries. This module can handle a commission taken by the payment office and has the following format: \* \_\_date\_\_: date of the payment \* \_\_amount\_\_: amount paid in the currency of the journal used in the importation \* \_\_label\_\_: the comunication given by the payment office, used as communication in the generated entries. Another column which can be used is \_\_commission_amount\_\_, representing the amount for the commission taken by line. Afterwards, the goal is to populate the journal items with information that the bank or office gave you. For this, completion rules can be specified by journal. Some basic rules are provided in this module: 1\) Match from statement line label (based on partner field 'Bank Statement Label') 2) Match from statement line label (based on partner name) 3) Match from statement line label (based on Invoice reference) Feel free to extend either the importation method, the completion method, or both.
Code Analysis ⓘ
Views touched (7)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
bk_view_partner_form |
account_bank_statement_import.view.partner.form | res.partner | form | Inherits account.view_partner_property_form |
journal_importer_view_form |
account.journal.view | account.journal | form | Inherits account.view_account_journal_form |
move_completion_rule_view_form |
account.move.completion.rule.view | account.move.completion.rule | form | New |
move_completion_rule_view_list |
account.move.completion.rule.view | account.move.completion.rule | list | New |
move_importer_view |
credit.statement.import.config.view | credit.statement.import | form | New |
view_account_move_filter |
account.move | Inherits account.view_account_move_filter | ||
view_move_importer_form |
account.move.view | account.move | form | Inherits account.view_move_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (6)
New fields (13)
-
autovalidate_completed_moveBooleanhelp='Tick that box to automatically validate the journal entries after the completion'string='Validate fully completed moves' -
commission_account_idMany2one → account.accountcomodel_name='account.account'string='Commission account' -
commission_analytic_account_idMany2one → account.analytic.accountcomodel_name='account.analytic.account'help='Choose an analytic account to be used on the commission line analytic distribution.'string='Commission Analytic Account' -
create_counterpartBooleandefault=Truehelp='Tick that box to automatically create the move counterpart' -
import_typeSelectiondefault='generic_csvxls_so'help='Choose here the method by which you want to import account moves for this journal.'string='Type of import' args: [('generic_csvxls_so', 'Generic .csv/.xls based on SO Name')] -
last_import_dateDatetime -
launch_import_completionBooleanhelp='Tick that box to automatically launch the completion on each imported file using this journal.'string='Launch completion after import' -
partner_idMany2one → res.partnercomodel_name='res.partner'help='Put a partner if you want to have it on the commission move (and optionaly on the counterpart of the intermediate/banking move if you tick the corresponding checkbox).'string='Bank/Payment Office partner' -
receivable_account_idMany2one → account.accountcomodel_name='account.account'help='Choose a receivable/payable account to use as the default debit/credit account.'string='Receivable/Payable Account' -
rule_idsMany2many → account.move.completion.rulecomodel_name='account.move.completion.rule'relation='account_journal_completion_rule_rel'string='Auto-completion rules' -
split_counterpartBooleanhelp='Two counterparts will be automatically created : one for the refunds and one for the payments' -
used_for_completionBooleanstring='Journal used for completion' -
used_for_importBooleanstring='Journal used for import'
-
multi_move_import(self, file_stream, ftype='csv')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 provided file :param char: ftype represent the file extension (csv by default) :return: list: list of ids of the created account.bank.statement -
prepare_move_line_vals(self, parser_vals, move)Hook to build the values of a line from the parser returned values. At least it fulfills the basic values. Override 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_move_vals(self, result_row_list, parser)Hook to build the values of the statement from the parser and the profile. -
write_logs_after_import(self, move, num_lines)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
New fields (3)
-
completion_logsTextreadonly=Truestring='Completion Log' -
import_partner_idMany2one → res.partnerstring='Partner from import' args: 'res.partner' -
used_for_completionBooleanreadonly=Truerelated='journal_id.used_for_completion'
-
button_auto_completion(self)Complete line with values given by rules and tic the already_completed checkbox so we won't compute them again unless the user untick them! -
write_completion_log(self, error_msg, number_imported)Write the log in the completion_logs field of the bank statement to let the user know what have been done. This is an append mode, so we don't overwrite what already recoded. :param int/long stat_id: ID of the account.bank.statement :param char error_msg: Message to add :number_imported int/long: Number of lines that have been completed :return True
New fields (4)
-
function_to_callSelectionstring='Method' args: [('get_from_name_and_invoice', 'From line name (based on customer invoice number)'), ('get_from_name_and_supplier_invoice', 'From line name (based on supplier invoice number)'), ('get_from_name_and_partner_field', 'From line name (based on partner field)'), ('get_from_name_and_partner_name', 'From line name (based on partner name)')] -
journal_idsMany2many → account.journalcomodel_name='account.journal'relation='account_journal_completion_rule_rel'string='Related journals' -
nameChar -
sequenceIntegerhelp='Lower means parsed first.'
-
get_from_name_and_invoice(self, line)Match the partner based on the invoice number and the reference of the statement line. Then, call the generic get_values_for_line method to complete other values. If more than one partner matched, raise the ErrorTooManyPartner error. :param dict line: read of the concerned account.bank.statement.line :return: A dict of value that can be passed directly to the write method of the statement line or {} {'partner_id': value, 'account_id': value, ...} -
get_from_name_and_partner_field(self, line)Match the partner based on the label field of the statement line and the text defined in the 'bank_statement_label' field of the partner. Remember that we can have values separated with ; Then, call the generic get_values_for_line method to complete other values. If more than one partner matched, raise the ErrorTooManyPartner error. :param dict line: read of the concerned account.bank.statement.line :return: A dict of value that can be passed directly to the write method of the statement line or {} {'partner_id': value, 'account_id': value, ...} -
get_from_name_and_partner_name(self, line)Match the partner based on the label field of the statement line and the name of the partner. Then, call the generic get_values_for_line method to complete other values. If more than one partner matched, raise the ErrorTooManyPartner error. :param dict st_line: read of the concerned account.bank.statement.line :return: A dict of value that can be passed directly to the write method of the statement line or {} {'partner_id': value, 'account_id': value, ...} -
get_from_name_and_supplier_invoice(self, line)Match the partner based on the invoice number and the reference of the statement line. Then, call the generic get_values_for_line method to complete other values. If more than one partner matched, raise the ErrorTooManyPartner error. :param dict line: read of the concerned account.bank.statement.line :return: A dict of value that can be passed directly to the write method of the statement line or {} {'partner_id': value, 'account_id': value, ...}
New fields (1)
-
already_completedBooleandefault=Falsehelp='When this checkbox is ticked, the auto-completion process/button will ignore this line.'string='Auto-Completed'
No public methods.
New fields (6)
-
commission_account_idMany2one → account.accountcomodel_name='account.account'readonly=Truerelated='journal_id.commission_account_id' -
file_nameChar -
input_statementBinaryrequired=Truestring='Statement file' -
journal_idMany2one → account.journalcomodel_name='account.journal'required=Truestring='Import configuration parameter' -
partner_idMany2one → res.partnercomodel_name='res.partner'readonly=Truerelated='journal_id.partner_id' -
receivable_account_idMany2one → account.accountcomodel_name='account.account'readonly=Truerelated='journal_id.receivable_account_id'
-
default_get(self, fields)@api.model -
import_statement(self)This Function import credit card agency statement
New fields (1)
-
bank_statement_labelCharhelp='Enter the various label found on your bank statement separated by a ; If one of this label is include in the bank statement line, the partner will be automatically filled (as long as you use this method/rules in your statement profile).'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…