From 34b22800324997ef34258e7a98be59d9c122b2eb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 18 Nov 2020 00:22:27 +0100 Subject: [PATCH] [MIG] account_bank_statement_import to v14 > account_statement_import Module renamed to account_statement_import to avoid conflit with Odoo enterprise Add support for multi-account statement files Integrate the feature provided by the module account_bank_statement_import_save_file Improve error messages Remove dead or annoying features Improve code ! --- account_statement_import/README.rst | 101 +++ account_statement_import/__init__.py | 4 +- account_statement_import/__manifest__.py | 26 +- .../account_bank_statement_import.py | 342 -------- .../account_bank_statement_import_view.xml | 77 -- .../account_import_tip_data.xml | 6 - .../i18n/account_bank_statement_import.pot | 800 ------------------ account_statement_import/models/__init__.py | 2 + .../models/account_bank_statement_line.py | 26 + .../{ => models}/account_journal.py | 17 +- .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 9 + account_statement_import/readme/USAGE.rst | 5 + .../security/ir.model.access.csv | 2 + .../static/csv/account.bank.statement.csv | 6 - .../static/description/icon_src.svg | 381 +++++---- .../static/description/index.html | 438 ++++++++++ .../src/js/account_bank_statement_import.js | 27 - ...ccount_bank_statement_import_templates.xml | 15 - .../views/account_bank_statement_line.xml | 25 + .../views/account_journal.xml | 25 + account_statement_import/wizard/__init__.py | 3 +- .../wizard/account_statement_import.py | 369 ++++++++ .../wizard/account_statement_import_view.xml | 42 + .../wizard/journal_creation.py | 22 - .../wizard/journal_creation.xml | 57 -- .../wizard/setup_wizards.py | 6 +- 27 files changed, 1279 insertions(+), 1557 deletions(-) create mode 100644 account_statement_import/README.rst delete mode 100644 account_statement_import/account_bank_statement_import.py delete mode 100644 account_statement_import/account_bank_statement_import_view.xml delete mode 100644 account_statement_import/account_import_tip_data.xml delete mode 100644 account_statement_import/i18n/account_bank_statement_import.pot create mode 100644 account_statement_import/models/__init__.py create mode 100644 account_statement_import/models/account_bank_statement_line.py rename account_statement_import/{ => models}/account_journal.py (56%) create mode 100644 account_statement_import/readme/CONTRIBUTORS.rst create mode 100644 account_statement_import/readme/DESCRIPTION.rst create mode 100644 account_statement_import/readme/USAGE.rst create mode 100644 account_statement_import/security/ir.model.access.csv delete mode 100644 account_statement_import/static/csv/account.bank.statement.csv create mode 100644 account_statement_import/static/description/index.html delete mode 100644 account_statement_import/static/src/js/account_bank_statement_import.js delete mode 100644 account_statement_import/views/account_bank_statement_import_templates.xml create mode 100644 account_statement_import/views/account_bank_statement_line.xml create mode 100644 account_statement_import/views/account_journal.xml create mode 100644 account_statement_import/wizard/account_statement_import.py create mode 100644 account_statement_import/wizard/account_statement_import_view.xml delete mode 100644 account_statement_import/wizard/journal_creation.py delete mode 100644 account_statement_import/wizard/journal_creation.xml diff --git a/account_statement_import/README.rst b/account_statement_import/README.rst new file mode 100644 index 00000000..362bf489 --- /dev/null +++ b/account_statement_import/README.rst @@ -0,0 +1,101 @@ +====================== +Import Statement Files +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github + :target: https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import + :alt: OCA/bank-statement-import +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/174/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module is the successor of the module **account_bank_statement_import** that was part of Odoo Community until Odoo v13 and was moved to Odoo Enterprise for Odoo v14 (cf `this commit `_). We decided to change its name and the name of the wizard object it provides in order to avoid a conflict with the Enterprise module. + +This module has several additionnal feature: + +* support multi-account bank statement files, +* attach the file to the bank statement (to facilitate the diagnostic in case of problem), +* improved error messages. + +This module only provides the technical framework for the import of statement files. You must also install the format-specific modules to add support for the statement file formats that your banks/provide use. For example, the OCA module **account_statement_import_ofx** will add support for the OFX (Open Financial Exchange) file format. You will find those modules in the OCA project `bank-statement-import `_ or, for the country-specific formats, in the OCA localization projects. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To import a statement file, go to the Invoicing dashboard: on a bank journal, you will see a button to import a statement. When you click on that button, a wizard will start and it will show the list of the supported file formats. Select the statement file that you want to import and click on the **Import** button. Odoo will create a new bank statement (or several if your statement file is a multi-account file). + +If your statement file contains transactions that were already imported in Odoo, they will not be created a second time. + +If the statement file contains information about the bank account number of the counter-part for some transactions (only a few statement file formats support that, in some countries) and that these bank account numbers exists on partners in Odoo, the partners will be set on the related statement lines. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Odoo SA +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Odoo S.A. +* Alexis de Lattre +* Tecnativa - Pedro M. Baeza + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px + :target: https://github.com/alexis-via + :alt: alexis-via + +Current `maintainer `__: + +|maintainer-alexis-via| + +This module is part of the `OCA/bank-statement-import `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_statement_import/__init__.py b/account_statement_import/__init__.py index 172a3434..9b429614 100644 --- a/account_statement_import/__init__.py +++ b/account_statement_import/__init__.py @@ -1,4 +1,2 @@ -from . import account_bank_statement_import -from . import account_journal - +from . import models from . import wizard diff --git a/account_statement_import/__manifest__.py b/account_statement_import/__manifest__.py index 2fb62519..dec5f11e 100644 --- a/account_statement_import/__manifest__.py +++ b/account_statement_import/__manifest__.py @@ -1,27 +1,25 @@ # Copyright 2004-2020 Odoo S.A. +# Copyright 2020 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre # Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0). { - "name": "Account Bank Statement Import", - "category": "Accounting/Accounting", - "version": "13.0.1.0.0", + "name": "Import Statement Files", + "category": "Accounting", + "version": "14.0.1.0.0", "license": "LGPL-3", "depends": ["account"], - "description": """Generic Wizard to Import Bank Statements. - -(This module does not include any type of import format.) - -OFX and QIF imports are available in Enterprise version.""", - "author": "Odoo SA", + "author": "Odoo SA, Akretion, Odoo Community Association (OCA)", + "maintainers": ["alexis-via"], + "website": "https://github.com/OCA/bank-statement-import", "data": [ - "account_bank_statement_import_view.xml", - "account_import_tip_data.xml", - "wizard/journal_creation.xml", - "views/account_bank_statement_import_templates.xml", + "security/ir.model.access.csv", + "wizard/account_statement_import_view.xml", + "views/account_journal.xml", + "views/account_bank_statement_line.xml", ], "demo": [ "demo/partner_bank.xml", ], "installable": True, - "auto_install": True, } diff --git a/account_statement_import/account_bank_statement_import.py b/account_statement_import/account_bank_statement_import.py deleted file mode 100644 index 461f2df3..00000000 --- a/account_statement_import/account_bank_statement_import.py +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 2004-2020 Odoo S.A. -# Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0). - -import base64 -import logging - -from odoo import _, api, fields, models -from odoo.exceptions import UserError - -from odoo.addons.base.models.res_bank import sanitize_account_number - -_logger = logging.getLogger(__name__) - - -class AccountBankStatementLine(models.Model): - _inherit = "account.bank.statement.line" - - # Ensure transactions can be imported only once (if the import format provides unique transaction ids) - unique_import_id = fields.Char(string="Import ID", readonly=True, copy=False) - - _sql_constraints = [ - ( - "unique_import_id", - "unique (unique_import_id)", - "A bank account transactions can be imported only once !", - ) - ] - - -class AccountBankStatementImport(models.TransientModel): - _name = "account.bank.statement.import" - _description = "Import Bank Statement" - - attachment_ids = fields.Many2many( - "ir.attachment", - string="Files", - required=True, - help="Get you bank statements in electronic format from your bank and select them here.", - ) - - def import_file(self): - """ Process the file chosen in the wizard, create bank statement(s) and go to reconciliation. """ - self.ensure_one() - statement_line_ids_all = [] - notifications_all = [] - # Let the appropriate implementation module parse the file and return the required data - # The active_id is passed in context in case an implementation module requires information about the wizard state (see QIF) - for data_file in self.attachment_ids: - currency_code, account_number, stmts_vals = self.with_context( - active_id=self.ids[0] - )._parse_file(base64.b64decode(data_file.datas)) - # Check raw data - self._check_parsed_data(stmts_vals) - # Try to find the currency and journal in odoo - currency, journal = self._find_additional_data( - currency_code, account_number - ) - # If no journal found, ask the user about creating one - if not journal: - # The active_id is passed in context so the wizard can call import_file again once the journal is created - return self.with_context( - active_id=self.ids[0] - )._journal_creation_wizard(currency, account_number) - if ( - not journal.default_debit_account_id - or not journal.default_credit_account_id - ): - raise UserError( - _( - "You have to set a Default Debit Account and a Default Credit Account for the journal: %s" - ) - % (journal.name,) - ) - # Prepare statement data to be used for bank statements creation - stmts_vals = self._complete_stmts_vals(stmts_vals, journal, account_number) - # Create the bank statements - statement_line_ids, notifications = self._create_bank_statements(stmts_vals) - statement_line_ids_all.extend(statement_line_ids) - notifications_all.extend(notifications) - # Now that the import worked out, set it as the bank_statements_source of the journal - if journal.bank_statements_source != "file_import": - # Use sudo() because only 'account.group_account_manager' - # has write access on 'account.journal', but 'account.group_account_user' - # must be able to import bank statement files - journal.sudo().bank_statements_source = "file_import" - # Finally dispatch to reconciliation interface - return { - "type": "ir.actions.client", - "tag": "bank_statement_reconciliation_view", - "context": { - "statement_line_ids": statement_line_ids_all, - "company_ids": self.env.user.company_ids.ids, - "notifications": notifications_all, - }, - } - - def _journal_creation_wizard(self, currency, account_number): - """ Calls a wizard that allows the user to carry on with journal creation """ - return { - "name": _("Journal Creation"), - "type": "ir.actions.act_window", - "res_model": "account.bank.statement.import.journal.creation", - "view_mode": "form", - "target": "new", - "context": { - "statement_import_transient_id": self.env.context["active_id"], - "default_bank_acc_number": account_number, - "default_name": _("Bank") + " " + account_number, - "default_currency_id": currency and currency.id or False, - "default_type": "bank", - }, - } - - def _parse_file(self, data_file): - """Each module adding a file support must extends this method. It processes the file if it can, returns super otherwise, resulting in a chain of responsability. - This method parses the given file and returns the data required by the bank statement import process, as specified below. - rtype: triplet (if a value can't be retrieved, use None) - - currency code: string (e.g: 'EUR') - The ISO 4217 currency code, case insensitive - - account number: string (e.g: 'BE1234567890') - The number of the bank account which the statement belongs to - - bank statements data: list of dict containing (optional items marked by o) : - - 'name': string (e.g: '000000123') - - 'date': date (e.g: 2013-06-26) - -o 'balance_start': float (e.g: 8368.56) - -o 'balance_end_real': float (e.g: 8888.88) - - 'transactions': list of dict containing : - - 'name': string (e.g: 'KBC-INVESTERINGSKREDIET 787-5562831-01') - - 'date': date - - 'amount': float - - 'unique_import_id': string - -o 'account_number': string - Will be used to find/create the res.partner.bank in odoo - -o 'note': string - -o 'partner_name': string - -o 'ref': string - """ - raise UserError( - _( - "Could not make sense of the given file.\nDid you install the module to support this type of file ?" - ) - ) - - def _check_parsed_data(self, stmts_vals): - """ Basic and structural verifications """ - if len(stmts_vals) == 0: - raise UserError(_("This file doesn't contain any statement.")) - - no_st_line = True - for vals in stmts_vals: - if vals["transactions"] and len(vals["transactions"]) > 0: - no_st_line = False - break - if no_st_line: - raise UserError(_("This file doesn't contain any transaction.")) - - def _check_journal_bank_account(self, journal, account_number): - return journal.bank_account_id.sanitized_acc_number == account_number - - def _find_additional_data(self, currency_code, account_number): - """Look for a res.currency and account.journal using values extracted from the - statement and make sure it's consistent. - """ - company_currency = self.env.company.currency_id - journal_obj = self.env["account.journal"] - currency = None - sanitized_account_number = sanitize_account_number(account_number) - - if currency_code: - currency = self.env["res.currency"].search( - [("name", "=ilike", currency_code)], limit=1 - ) - if not currency: - raise UserError(_("No currency found matching '%s'.") % currency_code) - if currency == company_currency: - currency = False - - journal = journal_obj.browse(self.env.context.get("journal_id", [])) - if account_number: - # No bank account on the journal : create one from the account number of the statement - if journal and not journal.bank_account_id: - journal.set_bank_account(account_number) - # No journal passed to the wizard : try to find one using the account number of the statement - elif not journal: - journal = journal_obj.search( - [ - ( - "bank_account_id.sanitized_acc_number", - "=", - sanitized_account_number, - ) - ] - ) - # Already a bank account on the journal : check it's the same as on the statement - else: - if not self._check_journal_bank_account( - journal, sanitized_account_number - ): - raise UserError( - _( - "The account of this statement (%s) is not the same as the journal (%s)." - ) - % (account_number, journal.bank_account_id.acc_number) - ) - - # If importing into an existing journal, its currency must be the same as the bank statement - if journal: - journal_currency = journal.currency_id - if currency is None: - currency = journal_currency - if currency and currency != journal_currency: - statement_cur_code = ( - not currency and company_currency.name or currency.name - ) - journal_cur_code = ( - not journal_currency - and company_currency.name - or journal_currency.name - ) - raise UserError( - _( - "The currency of the bank statement (%s) is not the same as the currency of the journal (%s)." - ) - % (statement_cur_code, journal_cur_code) - ) - - # If we couldn't find / can't create a journal, everything is lost - if not journal and not account_number: - raise UserError( - _( - "Cannot find in which journal import this statement. Please manually select a journal." - ) - ) - - return currency, journal - - def _complete_stmts_vals(self, stmts_vals, journal, account_number): - for st_vals in stmts_vals: - st_vals["journal_id"] = journal.id - if not st_vals.get("reference"): - st_vals["reference"] = " ".join(self.attachment_ids.mapped("name")) - if st_vals.get("number"): - # build the full name like BNK/2016/00135 by just giving the number '135' - st_vals["name"] = journal.sequence_id.with_context( - ir_sequence_date=st_vals.get("date") - ).get_next_char(st_vals["number"]) - del st_vals["number"] - for line_vals in st_vals["transactions"]: - unique_import_id = line_vals.get("unique_import_id") - if unique_import_id: - sanitized_account_number = sanitize_account_number(account_number) - line_vals["unique_import_id"] = ( - ( - sanitized_account_number - and sanitized_account_number + "-" - or "" - ) - + str(journal.id) - + "-" - + unique_import_id - ) - - if not line_vals.get("bank_account_id"): - # Find the partner and his bank account or create the bank account. The partner selected during the - # reconciliation process will be linked to the bank when the statement is closed. - identifying_string = line_vals.get("account_number") - if identifying_string: - partner_bank = self.env["res.partner.bank"].search( - [("acc_number", "=", identifying_string)], limit=1 - ) - if partner_bank: - line_vals["bank_account_id"] = partner_bank.id - line_vals["partner_id"] = partner_bank.partner_id.id - return stmts_vals - - def _create_bank_statements(self, stmts_vals): - """ Create new bank statements from imported values, filtering out already imported transactions, and returns data used by the reconciliation widget """ - BankStatement = self.env["account.bank.statement"] - BankStatementLine = self.env["account.bank.statement.line"] - - # Filter out already imported transactions and create statements - statement_line_ids = [] - ignored_statement_lines_import_ids = [] - for st_vals in stmts_vals: - filtered_st_lines = [] - for line_vals in st_vals["transactions"]: - if ( - "unique_import_id" not in line_vals - or not line_vals["unique_import_id"] - or not bool( - BankStatementLine.sudo().search( - [("unique_import_id", "=", line_vals["unique_import_id"])], - limit=1, - ) - ) - ): - filtered_st_lines.append(line_vals) - else: - ignored_statement_lines_import_ids.append( - line_vals["unique_import_id"] - ) - if "balance_start" in st_vals: - st_vals["balance_start"] += float(line_vals["amount"]) - - if len(filtered_st_lines) > 0: - # Remove values that won't be used to create records - st_vals.pop("transactions", None) - # Create the statement - st_vals["line_ids"] = [[0, False, line] for line in filtered_st_lines] - statement_line_ids.extend(BankStatement.create(st_vals).line_ids.ids) - if len(statement_line_ids) == 0: - raise UserError(_("You already have imported that file.")) - - # Prepare import feedback - notifications = [] - num_ignored = len(ignored_statement_lines_import_ids) - if num_ignored > 0: - notifications += [ - { - "type": "warning", - "message": _( - "%d transactions had already been imported and were ignored." - ) - % num_ignored - if num_ignored > 1 - else _("1 transaction had already been imported and was ignored."), - "details": { - "name": _("Already imported items"), - "model": "account.bank.statement.line", - "ids": BankStatementLine.search( - [ - ( - "unique_import_id", - "in", - ignored_statement_lines_import_ids, - ) - ] - ).ids, - }, - } - ] - return statement_line_ids, notifications diff --git a/account_statement_import/account_bank_statement_import_view.xml b/account_statement_import/account_bank_statement_import_view.xml deleted file mode 100644 index f9e27e73..00000000 --- a/account_statement_import/account_bank_statement_import_view.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - Upload Bank Statements - account.bank.statement.import - 1 - -
-

You can upload your bank statement using:

-
    - -
- -
-
- -
-
- - - Install Import Format - ir.module.module - kanban,tree,form - - - - - - Upload - ir.actions.act_window - account.bank.statement.import - form - new - - - - - account.journal.dashboard.kanban.inherit - account.journal - - - - or Import - - - - - - -
diff --git a/account_statement_import/account_import_tip_data.xml b/account_statement_import/account_import_tip_data.xml deleted file mode 100644 index 0d4c5364..00000000 --- a/account_statement_import/account_import_tip_data.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/account_statement_import/i18n/account_bank_statement_import.pot b/account_statement_import/i18n/account_bank_statement_import.pot deleted file mode 100644 index 97c87421..00000000 --- a/account_statement_import/i18n/account_bank_statement_import.pot +++ /dev/null @@ -1,800 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_bank_statement_import -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server saas~12.5\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-27 09:10+0000\n" -"PO-Revision-Date: 2019-09-27 09:10+0000\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_bank_statement_import -#. openerp-web -#: code:addons/account_bank_statement_import/static/src/js/account_bank_statement_import.js:0 -#, python-format -msgid " Import Template for Bank Statements" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "%d transactions had already been imported and were ignored." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "1 transaction had already been imported and was ignored." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.constraint,message:account_bank_statement_import.constraint_account_bank_statement_line_unique_import_id -msgid "A bank account transactions can be imported only once !" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__company_partner_id -msgid "Account Holder" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__bank_acc_number -msgid "Account Number" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__type_control_ids -msgid "Account Types Allowed" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__account_control_ids -msgid "Accounts Allowed" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_needaction -msgid "Action Needed" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__active -msgid "Active" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_ids -msgid "Activities" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_exception_decoration -msgid "Activity Exception Decoration" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_state -msgid "Activity State" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__alias_id -msgid "Alias" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__alias_name -msgid "Alias Name" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__alias_domain -msgid "Alias domain" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "Already imported items" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__at_least_one_inbound -msgid "At Least One Inbound" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__at_least_one_outbound -msgid "At Least One Outbound" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_attachment_count -msgid "Attachment Count" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__bank_id -#, python-format -msgid "Bank" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__bank_account_id -msgid "Bank Account" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__bank_statements_source -msgid "Bank Feeds" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -msgid "Bank Journal Name" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model,name:account_bank_statement_import.model_account_bank_statement_line -msgid "Bank Statement Line" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model,name:account_bank_statement_import.model_account_setup_bank_manual_config -msgid "Bank setup manual config" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_view -msgid "Cancel" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "" -"Cannot find in which journal import this statement. Please manually select a" -" journal." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence -msgid "" -"Check this box if you don't want to share the same sequence for invoices and" -" credit notes made from this journal" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__color -msgid "Color Index" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__invoice_reference_model -msgid "Communication Standard" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__invoice_reference_type -msgid "Communication Type" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__company_id -msgid "Company" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__company_id -msgid "Company related to this journal" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "" -"Could not make sense of the given file.\n" -"Did you install the module to support this type of file ?" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__create_uid -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__create_uid -msgid "Created by" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__create_date -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__create_date -msgid "Created on" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence_id -msgid "Credit Note Entry Sequence" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence_number_next -msgid "Credit Notes Next Number" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__currency_id -msgid "Currency" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence -msgid "Dedicated Credit Note Sequence" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__default_credit_account_id -msgid "Default Credit Account" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__default_debit_account_id -msgid "Default Debit Account" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__bank_statements_source -msgid "Defines how the bank statements will be registered" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__display_name -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__display_name -msgid "Display Name" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence_id -msgid "Entry Sequence" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__filename -msgid "Filename" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__attachment_ids -msgid "Files" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_follower_ids -msgid "Followers" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_channel_ids -msgid "Followers (Channels)" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_partner_ids -msgid "Followers (Partners)" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__inbound_payment_method_ids -msgid "For Incoming Payments" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__outbound_payment_method_ids -msgid "For Outgoing Payments" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import__attachment_ids -msgid "" -"Get you bank statements in electronic format from your bank and select them " -"here." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__id -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__id -msgid "ID" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_exception_icon -msgid "Icon" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_exception_icon -msgid "Icon to indicate an exception activity." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_needaction -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_unread -msgid "If checked, new messages require your attention." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_error -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_sms_error -msgid "If checked, some messages have a delivery error." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__restrict_mode_hash_table -msgid "" -"If ticked, the accounting entry or invoice receives a hash as soon as it is " -"posted and cannot be modified anymore." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_journal.py:0 -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.journal_dashboard_view_inherit -#, python-format -msgid "Import" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model,name:account_bank_statement_import.model_account_bank_statement_import -msgid "Import Bank Statement" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_line__unique_import_id -msgid "Import ID" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.journal_dashboard_view_inherit -msgid "Import Statement" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.actions.act_window,name:account_bank_statement_import.install_more_import_formats_action -msgid "Install Import Format" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_is_follower -msgid "Is Follower" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__default_credit_account_id -msgid "It acts as a default account for credit amount" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__default_debit_account_id -msgid "It acts as a default account for debit amount" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__alias_name -msgid "It creates draft invoices and bills by sending an email." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model,name:account_bank_statement_import.model_account_journal -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__journal_id -msgid "Journal" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -#, python-format -msgid "Journal Creation" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model,name:account_bank_statement_import.model_account_bank_statement_import_journal_creation -msgid "Journal Creation on Bank Statement Import" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__journal_group_ids -msgid "Journal Groups" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__name -msgid "Journal Name" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__json_activity_data -msgid "Json Activity Data" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -msgid "" -"Just click OK to create the account/journal and finish the upload. If this " -"was a mistake, hit cancel to abort the upload." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__kanban_dashboard -msgid "Kanban Dashboard" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__kanban_dashboard_graph -msgid "Kanban Dashboard Graph" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import____last_update -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation____last_update -msgid "Last Modified on" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__write_uid -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__write_uid -msgid "Last Updated by" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import__write_date -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__write_date -msgid "Last Updated on" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__restrict_mode_hash_table -msgid "Lock Posted Entries with Hash" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__loss_account_id -msgid "Loss Account" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_main_attachment_id -msgid "Main Attachment" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__inbound_payment_method_ids -msgid "" -"Manual: Get paid by cash, check or any other method outside of Odoo.\n" -"Electronic: Get paid automatically through a payment acquirer by requesting a transaction on a card saved by the customer when buying or subscribing online (payment token).\n" -"Batch Deposit: Encase several customer checks at once by generating a batch deposit to submit to your bank. When encoding the bank statement in Odoo,you are suggested to reconcile the transaction with the batch deposit. Enable this option from the settings." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__outbound_payment_method_ids -msgid "" -"Manual:Pay bill by cash or any other method outside of Odoo.\n" -"Check:Pay bill by check and print it from Odoo.\n" -"SEPA Credit Transfer: Pay bill from a SEPA Credit Transfer file you submit to your bank. Enable this option from the settings." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_error -msgid "Message Delivery error" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_ids -msgid "Messages" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_date_deadline -msgid "Next Activity Deadline" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_summary -msgid "Next Activity Summary" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_type_id -msgid "Next Activity Type" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence_number_next -msgid "Next Number" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "No currency found matching '%s'." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_needaction_counter -msgid "Number of Actions" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_error_counter -msgid "Number of errors" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_needaction_counter -msgid "Number of messages which requires an action" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_error_counter -msgid "Number of messages with delivery error" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_unread_counter -msgid "Number of unread messages" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -msgid "OK" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__post_at -msgid "Post At" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__profit_account_id -msgid "Profit Account" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_user_id -msgid "Responsible User" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__secure_sequence_id -msgid "Secure Sequence" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__type -msgid "" -"Select 'Sale' for customer invoices journals.\n" -"Select 'Purchase' for vendor bills journals.\n" -"Select 'Cash' or 'Bank' for journals that are used in customer or vendor payments.\n" -"Select 'General' for miscellaneous operations journals." -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_view -msgid "Select Files" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence -msgid "Sequence" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__secure_sequence_id -msgid "Sequence to use to ensure the securisation of data" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__active -msgid "Set active to false to hide the Journal without removing it." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__code -msgid "Short Code" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__show_on_dashboard -msgid "Show journal on dashboard" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_state -msgid "" -"Status based on activities\n" -"Overdue: Due date is already passed\n" -"Today: Activity date is today\n" -"Planned: Future activities." -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_journal_creation_view -msgid "" -"The account of the statement you are uploading is not yet recorded in Odoo. " -"In order to proceed with the upload, you need to create a bank journal for " -"this account." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "" -"The account of this statement (%s) is not the same as the journal (%s)." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "" -"The currency of the bank statement (%s) is not the same as the currency of " -"the journal (%s)." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__currency_id -msgid "The currency used to enter statement" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__code -msgid "The journal entries of this journal will be named using this prefix." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence_number_next -msgid "The next sequence number will be used for the next credit note." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence_number_next -msgid "The next sequence number will be used for the next invoice." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__refund_sequence_id -msgid "" -"This field contains the information related to the numbering of the credit " -"note entries of this journal." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence_id -msgid "" -"This field contains the information related to the numbering of the journal " -"entries of this journal." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "This file doesn't contain any statement." -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "This file doesn't contain any transaction." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__type -msgid "Type" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__activity_exception_decoration -msgid "Type of the exception activity on record." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_unread -msgid "Unread Messages" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__message_unread_counter -msgid "Unread Messages Counter" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.actions.act_window,name:account_bank_statement_import.action_account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_view -msgid "Upload" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_view -msgid "Upload Bank Statements" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__sequence -msgid "Used to order Journals in the dashboard view" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__loss_account_id -msgid "" -"Used to register a loss when the ending balance of a cash register differs " -"from what the system computes" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__profit_account_id -msgid "" -"Used to register a profit when the ending balance of a cash register differs" -" from what the system computes" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,field_description:account_bank_statement_import.field_account_bank_statement_import_journal_creation__website_message_ids -msgid "Website Messages" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__website_message_ids -msgid "Website communication history" -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__show_on_dashboard -msgid "Whether this journal should be displayed on the dashboard or not" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "You already have imported that file." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__invoice_reference_model -msgid "" -"You can choose different models for each type of reference. The default one " -"is the Odoo reference." -msgstr "" - -#. module: account_bank_statement_import -#: model:ir.model.fields,help:account_bank_statement_import.field_account_bank_statement_import_journal_creation__invoice_reference_type -msgid "" -"You can set here the default communication that will appear on customer " -"invoices, once validated, to help the customer to refer to that particular " -"invoice when making the payment." -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.account_bank_statement_import_view -msgid "You can upload your bank statement using:" -msgstr "" - -#. module: account_bank_statement_import -#: code:addons/account_bank_statement_import/account_bank_statement_import.py:0 -#, python-format -msgid "" -"You have to set a Default Debit Account and a Default Credit Account for the" -" journal: %s" -msgstr "" - -#. module: account_bank_statement_import -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import.journal_dashboard_view_inherit -msgid "or" -msgstr "" diff --git a/account_statement_import/models/__init__.py b/account_statement_import/models/__init__.py new file mode 100644 index 00000000..16a78ca3 --- /dev/null +++ b/account_statement_import/models/__init__.py @@ -0,0 +1,2 @@ +from . import account_journal +from . import account_bank_statement_line diff --git a/account_statement_import/models/account_bank_statement_line.py b/account_statement_import/models/account_bank_statement_line.py new file mode 100644 index 00000000..048143b2 --- /dev/null +++ b/account_statement_import/models/account_bank_statement_line.py @@ -0,0 +1,26 @@ +# Copyright 2004-2020 Odoo S.A. +# Copyright 2020 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0). + +from odoo import fields, models + + +class AccountBankStatementLine(models.Model): + _inherit = "account.bank.statement.line" + + # Ensure transactions can be imported only once + # (if the import format provides unique transaction ids) + unique_import_id = fields.Char(string="Import ID", readonly=True, copy=False) + # v13 field: bank_partner_id + # This field was removed in v14, but it is still used in the code, cf the + # method reconcile() !!! So I restore the field here + partner_bank_id = fields.Many2one("res.partner.bank", string="Partner Bank Account") + + _sql_constraints = [ + ( + "unique_import_id", + "unique(unique_import_id)", + "A bank account transaction can be imported only once!", + ) + ] diff --git a/account_statement_import/account_journal.py b/account_statement_import/models/account_journal.py similarity index 56% rename from account_statement_import/account_journal.py rename to account_statement_import/models/account_journal.py index b8192b61..f49bfa0c 100644 --- a/account_statement_import/account_journal.py +++ b/account_statement_import/models/account_journal.py @@ -1,7 +1,9 @@ # Copyright 2004-2020 Odoo S.A. +# Copyright 2020 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre # Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0). -from odoo import _, api, models +from odoo import _, models class AccountJournal(models.Model): @@ -12,7 +14,7 @@ class AccountJournal(models.Model): return [] def __get_bank_statements_available_sources(self): - rslt = super(AccountJournal, self).__get_bank_statements_available_sources() + rslt = super().__get_bank_statements_available_sources() formats_list = self._get_bank_statements_available_import_formats() if formats_list: formats_list.sort() @@ -21,9 +23,10 @@ class AccountJournal(models.Model): return rslt def import_statement(self): - """return action to import bank/cash statements. This button should be called only on journals with type =='bank'""" - action_name = "action_account_bank_statement_import" - [action] = self.env.ref("account_bank_statement_import.%s" % action_name).read() - # Note: this drops action['context'], which is a dict stored as a string, which is not easy to update - action.update({"context": (u"{'journal_id': " + str(self.id) + u"}")}) + """return action to import bank/cash statements. + This button should be called only on journals with type =='bank'""" + action = self.env.ref( + "account_statement_import.account_statement_import_action" + ).read()[0] + action["context"] = {"journal_id": self.id} return action diff --git a/account_statement_import/readme/CONTRIBUTORS.rst b/account_statement_import/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..54f339ba --- /dev/null +++ b/account_statement_import/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Odoo S.A. +* Alexis de Lattre +* Tecnativa - Pedro M. Baeza diff --git a/account_statement_import/readme/DESCRIPTION.rst b/account_statement_import/readme/DESCRIPTION.rst new file mode 100644 index 00000000..7a5804d0 --- /dev/null +++ b/account_statement_import/readme/DESCRIPTION.rst @@ -0,0 +1,9 @@ +This module is the successor of the module **account_bank_statement_import** that was part of Odoo Community until Odoo v13 and was moved to Odoo Enterprise for Odoo v14 (cf `this commit `_). We decided to change its name and the name of the wizard object it provides in order to avoid a conflict with the Enterprise module. + +This module has several additionnal feature: + +* support multi-account bank statement files, +* attach the file to the bank statement (to facilitate the diagnostic in case of problem), +* improved error messages. + +This module only provides the technical framework for the import of statement files. You must also install the format-specific modules to add support for the statement file formats that your banks/provide use. For example, the OCA module **account_statement_import_ofx** will add support for the OFX (Open Financial Exchange) file format. You will find those modules in the OCA project `bank-statement-import `_ or, for the country-specific formats, in the OCA localization projects. diff --git a/account_statement_import/readme/USAGE.rst b/account_statement_import/readme/USAGE.rst new file mode 100644 index 00000000..2b9b09c2 --- /dev/null +++ b/account_statement_import/readme/USAGE.rst @@ -0,0 +1,5 @@ +To import a statement file, go to the Invoicing dashboard: on a bank journal, you will see a button to import a statement. When you click on that button, a wizard will start and it will show the list of the supported file formats. Select the statement file that you want to import and click on the **Import** button. Odoo will create a new bank statement (or several if your statement file is a multi-account file). + +If your statement file contains transactions that were already imported in Odoo, they will not be created a second time. + +If the statement file contains information about the bank account number of the counter-part for some transactions (only a few statement file formats support that, in some countries) and that these bank account numbers exists on partners in Odoo, the partners will be set on the related statement lines. diff --git a/account_statement_import/security/ir.model.access.csv b/account_statement_import/security/ir.model.access.csv new file mode 100644 index 00000000..66aa9a57 --- /dev/null +++ b/account_statement_import/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_statement_import_user,Full access on account.statement.import wizard,model_account_statement_import,account.group_account_user,1,1,1,1 diff --git a/account_statement_import/static/csv/account.bank.statement.csv b/account_statement_import/static/csv/account.bank.statement.csv deleted file mode 100644 index 7be40fd0..00000000 --- a/account_statement_import/static/csv/account.bank.statement.csv +++ /dev/null @@ -1,6 +0,0 @@ -Journal,Name,Date,Starting Balance,Ending Balance,Statement lines / Date,Statement lines / Label,Statement lines / Partner,Statement lines / Reference,Statement lines / Amount,Statement lines / Amount Currency,Statement lines / Currency -Bank,Statement May 01,2017-05-15,100,5124.5,2017-05-10,INV/2017/0001,,#01,4610,, -,,,,,2017-05-11,Payment bill 20170521,,#02,-100,, -,,,,,2017-05-15,INV/2017/0003 discount 2% early payment,,#03,514.5,, -Bank,Statement May 02,2017-05-30,5124.5,9847.35,2017-05-30,INV/2017/0002 + INV/2017/0004,,#01,5260,, -,,,,,2017-05-31,Payment bill EUR 001234565,,#02,-537.15,-500,EUR diff --git a/account_statement_import/static/description/icon_src.svg b/account_statement_import/static/description/icon_src.svg index 664381e0..70fab01c 100644 --- a/account_statement_import/static/description/icon_src.svg +++ b/account_statement_import/static/description/icon_src.svg @@ -1,178 +1,207 @@ - + image/svg+xml08/12/13 1000.00 Delta PC08/15/13 75.46 Walts Drugs03/03/13 379.00 Epic Technologies03/04/13 20.28 YOUR LOCAL SU03/03/13 421.35 SPRINGFIELD WA03/03/13 379.00 Epic Technologies03/04/13 20.28 YOUR LOCAL SUP08/15/13 75.46 Walts Drugs08/12/13 1000.00 Delta PC03/03/13 421.35 SPRINGFIELD WA03/04/13 20.28 YOUR LOCAL SU03/03/13 379.00 Epic Technologies08/12/13 1000.00 De a PC03/03/13 379.00 E Technologies08/15/13 75.46 Walts Drugs03/04/13 20.28 YOUR LOCAL SU03/03/13 379.00 Epic Technologies08/12/13 1000.00 Delta PC08/15/13 75.46 Walts Drugs + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + enable-background="new 0 0 100 100" + height="100px" + id="Layer_1" + version="1.1" + viewBox="0 0 100 100" + width="100px" + xml:space="preserve" + inkscape:version="0.48.2 r9819" + sodipodi:docname="1409271720_Noun_Project_100Icon_10px_grid-17.svg" + inkscape:export-filename="/Users/arthurmaniet/Desktop/icon.png" + inkscape:export-xdpi="115.2" + inkscape:export-ydpi="115.2" +>image/svg+xml08/12/13 1000.00 Delta PC08/15/13 75.46 Walts Drugs03/03/13 379.00 Epic Technologies03/04/13 20.28 YOUR LOCAL SU03/03/13 421.35 SPRINGFIELD WA03/03/13 379.00 Epic Technologies03/04/13 20.28 YOUR LOCAL SUP08/15/13 75.46 Walts Drugs08/12/13 1000.00 Delta PC03/03/13 421.35 SPRINGFIELD WA03/04/13 20.28 YOUR LOCAL SU03/03/13 379.00 Epic Technologies08/12/13 1000.00 De a PC03/03/13 379.00 E Technologies08/15/13 75.46 Walts Drugs03/04/13 20.28 YOUR LOCAL SU03/03/13 379.00 Epic Technologies08/12/13 1000.00 Delta PC08/15/13 75.46 Walts Drugs - \ No newline at end of file + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="43.851177" + y="32.13871" + id="text3838" + sodipodi:linespacing="125%" + inkscape:export-filename="/Users/arthurmaniet/Desktop/icon.png" + inkscape:export-xdpi="115.2" + inkscape:export-ydpi="115.2" + > + diff --git a/account_statement_import/static/description/index.html b/account_statement_import/static/description/index.html new file mode 100644 index 00000000..892b9ca9 --- /dev/null +++ b/account_statement_import/static/description/index.html @@ -0,0 +1,438 @@ + + + + + + +Import Statement Files + + + +
+

Import Statement Files

+ + +

Beta License: LGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

+

This module is the successor of the module account_bank_statement_import that was part of Odoo Community until Odoo v13 and was moved to Odoo Enterprise for Odoo v14 (cf this commit). We decided to change its name and the name of the wizard object it provides in order to avoid a conflict with the Enterprise module.

+

This module has several additionnal feature:

+
    +
  • support multi-account bank statement files,
  • +
  • attach the file to the bank statement (to facilitate the diagnostic in case of problem),
  • +
  • improved error messages.
  • +
+

This module only provides the technical framework for the import of statement files. You must also install the format-specific modules to add support for the statement file formats that your banks/provide use. For example, the OCA module account_statement_import_ofx will add support for the OFX (Open Financial Exchange) file format. You will find those modules in the OCA project bank-statement-import or, for the country-specific formats, in the OCA localization projects.

+

Table of contents

+ +
+

Usage

+

To import a statement file, go to the Invoicing dashboard: on a bank journal, you will see a button to import a statement. When you click on that button, a wizard will start and it will show the list of the supported file formats. Select the statement file that you want to import and click on the Import button. Odoo will create a new bank statement (or several if your statement file is a multi-account file).

+

If your statement file contains transactions that were already imported in Odoo, they will not be created a second time.

+

If the statement file contains information about the bank account number of the counter-part for some transactions (only a few statement file formats support that, in some countries) and that these bank account numbers exists on partners in Odoo, the partners will be set on the related statement lines.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Odoo SA
  • +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

alexis-via

+

This module is part of the OCA/bank-statement-import project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_statement_import/static/src/js/account_bank_statement_import.js b/account_statement_import/static/src/js/account_bank_statement_import.js deleted file mode 100644 index 0301bf73..00000000 --- a/account_statement_import/static/src/js/account_bank_statement_import.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright 2004-2020 Odoo S.A. - Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0). -*/ - -odoo.define("account_bank_statement_import.import", function (require) { - "use strict"; - - var core = require("web.core"); - var BaseImport = require("base_import.import"); - - var _t = core._t; - - BaseImport.DataImport.include({ - renderImportLink: function () { - this._super(); - if (this.res_model == "account.bank.statement") { - this.$(".import-link").prop({ - text: _t(" Import Template for Bank Statements"), - href: - "/account_bank_statement_import/static/csv/account.bank.statement.csv", - }); - this.$(".template-import").removeClass("d-none"); - } - }, - }); -}); diff --git a/account_statement_import/views/account_bank_statement_import_templates.xml b/account_statement_import/views/account_bank_statement_import_templates.xml deleted file mode 100644 index 7b562c6a..00000000 --- a/account_statement_import/views/account_bank_statement_import_templates.xml +++ /dev/null @@ -1,15 +0,0 @@ - - -