mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
67
account_bank_statement_import_ofx/README.rst
Normal file
67
account_bank_statement_import_ofx/README.rst
Normal file
@@ -0,0 +1,67 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
|
||||
=========================
|
||||
Import OFX Bank Statement
|
||||
=========================
|
||||
|
||||
This module adds support for the import of bank statements in `OFX format <https://en.wikipedia.org/wiki/Open_Financial_Exchange>`_.
|
||||
|
||||
Bank Statements may be generated containing a subset of the OFX information (only those transaction lines that are required for the
|
||||
creation of the Financial Accounting records).
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
The module requires one additional python lib:
|
||||
|
||||
* `ofxparse <http://pypi.python.org/pypi/ofxparse>`_
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/174/11.0
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* None
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/OCA/bank-statement-import/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.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Odoo SA
|
||||
* Alexis de Lattre <alexis@via.ecp.fr>
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* Ronald Portier <rportier@therp.nl>
|
||||
* Sylvain LE GAL <https://twitter.com/legalsylvain>
|
||||
* Nicolas JEUDY <https://github.com/njeudy>
|
||||
* Le Filament <https://github.com/lefilament>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
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.
|
||||
|
||||
To contribute to this module, please visit https://odoo-community.org.
|
||||
1
account_bank_statement_import_ofx/__init__.py
Normal file
1
account_bank_statement_import_ofx/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models, wizard
|
||||
18
account_bank_statement_import_ofx/__manifest__.py
Normal file
18
account_bank_statement_import_ofx/__manifest__.py
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "Import OFX Bank Statement",
|
||||
"category": "Banking addons",
|
||||
"version": "13.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "Odoo SA,"
|
||||
"Akretion,"
|
||||
"La Louve,"
|
||||
"GRAP,"
|
||||
"Nicolas JEUDY,"
|
||||
"Le Filament,"
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/bank-statement-import",
|
||||
"depends": ["account_bank_statement_import"],
|
||||
"data": ["views/view_account_bank_statement_import.xml"],
|
||||
"external_dependencies": {"python": ["ofxparse"]},
|
||||
"installable": True,
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \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_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid "The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
|
||||
47
account_bank_statement_import_ofx/i18n/de.po
Normal file
47
account_bank_statement_import_ofx/i18n/de.po
Normal file
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:55+0000\n"
|
||||
"PO-Revision-Date: 2017-04-11 21:55+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Kontoauszug importieren"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr "Open Financial Exchange (.OFX Money)"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"Das folgende Problem ist beim Importieren aufgetreten. Die Datei ist dürfte "
|
||||
"ungültig sein.\n"
|
||||
"\n"
|
||||
"%s"
|
||||
43
account_bank_statement_import_ofx/i18n/es.po
Normal file
43
account_bank_statement_import_ofx/i18n/es.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-05-29 00:50+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
|
||||
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-statement-"
|
||||
"import-8-0/language/es/)\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importar extracto bancario"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
43
account_bank_statement_import_ofx/i18n/fi.po
Normal file
43
account_bank_statement_import_ofx/i18n/fi.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-19 03:39+0000\n"
|
||||
"PO-Revision-Date: 2017-03-19 03:39+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
|
||||
"Language: fi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Tuo pankkiaineisto"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
47
account_bank_statement_import_ofx/i18n/fr.po
Normal file
47
account_bank_statement_import_ofx/i18n/fr.po
Normal file
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:55+0000\n"
|
||||
"PO-Revision-Date: 2017-04-11 21:55+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importer Relevé Bancaire"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr "Open Financial Exchange (.OFX Money)"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"Le problème suivant est survenu lors de l'importation. Le fichier n'est pas "
|
||||
"valide.\n"
|
||||
"\n"
|
||||
"%s"
|
||||
44
account_bank_statement_import_ofx/i18n/fr_CH.po
Normal file
44
account_bank_statement_import_ofx/i18n/fr_CH.po
Normal file
@@ -0,0 +1,44 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-19 03:39+0000\n"
|
||||
"PO-Revision-Date: 2017-03-19 03:39+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: French (Switzerland) (https://www.transifex.com/oca/"
|
||||
"teams/23907/fr_CH/)\n"
|
||||
"Language: fr_CH\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importer Relevé"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
43
account_bank_statement_import_ofx/i18n/gl.po
Normal file
43
account_bank_statement_import_ofx/i18n/gl.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-19 03:39+0000\n"
|
||||
"PO-Revision-Date: 2017-03-19 03:39+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n"
|
||||
"Language: gl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importar extracto bancario"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
48
account_bank_statement_import_ofx/i18n/lt_LT.po
Normal file
48
account_bank_statement_import_ofx/i18n/lt_LT.po
Normal file
@@ -0,0 +1,48 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:55+0000\n"
|
||||
"PO-Revision-Date: 2017-04-11 21:55+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/"
|
||||
"teams/23907/lt_LT/)\n"
|
||||
"Language: lt_LT\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
|
||||
"%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importuoti banko išrašą"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"Klaida. Failas gali būti sugadintas arba negaliojantis.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
44
account_bank_statement_import_ofx/i18n/nb_NO.po
Normal file
44
account_bank_statement_import_ofx/i18n/nb_NO.po
Normal file
@@ -0,0 +1,44 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-19 03:39+0000\n"
|
||||
"PO-Revision-Date: 2017-03-19 03:39+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/"
|
||||
"teams/23907/nb_NO/)\n"
|
||||
"Language: nb_NO\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importer bankutsagn"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
47
account_bank_statement_import_ofx/i18n/nl.po
Normal file
47
account_bank_statement_import_ofx/i18n/nl.po
Normal file
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:55+0000\n"
|
||||
"PO-Revision-Date: 2017-04-11 21:55+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importeer bankafschrift"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"Het volgende probleem is opgetreden tijdens de import. Het bestand is "
|
||||
"waarschijnlijk niet juist.\n"
|
||||
"\n"
|
||||
"%s"
|
||||
49
account_bank_statement_import_ofx/i18n/pt_BR.po
Normal file
49
account_bank_statement_import_ofx/i18n/pt_BR.po
Normal file
@@ -0,0 +1,49 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-11-21 01:42+0000\n"
|
||||
"PO-Revision-Date: 2019-08-26 15:01+0000\n"
|
||||
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
|
||||
"teams/23907/pt_BR/)\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 3.8\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importar Extrato Bancário"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr "Troca Financeira Aberta (.OFX Money)"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"O seguinte problema ocorreu durante a importação. O arquivo não deve ser "
|
||||
"válido.\n"
|
||||
"\n"
|
||||
"%s"
|
||||
44
account_bank_statement_import_ofx/i18n/pt_PT.po
Normal file
44
account_bank_statement_import_ofx/i18n/pt_PT.po
Normal file
@@ -0,0 +1,44 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-19 03:39+0000\n"
|
||||
"PO-Revision-Date: 2017-03-19 03:39+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/"
|
||||
"teams/23907/pt_PT/)\n"
|
||||
"Language: pt_PT\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importar Extrato Bancário"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
47
account_bank_statement_import_ofx/i18n/sl.po
Normal file
47
account_bank_statement_import_ofx/i18n/sl.po
Normal file
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_ofx
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:55+0000\n"
|
||||
"PO-Revision-Date: 2017-04-11 21:55+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
|
||||
"Language: sl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||
"%100==4 ? 2 : 3);\n"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Uvoz bančnega izpiska"
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model:ir.model,name:account_bank_statement_import_ofx.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_ofx.view_account_bank_statement_import_form
|
||||
msgid "Open Financial Exchange (.OFX Money)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_ofx
|
||||
#: code:addons/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py:85
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The following problem occurred during import. The file might not be valid.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
msgstr ""
|
||||
"Med uvozom je prišlo do težav. Datoteka ni veljavna.\n"
|
||||
"\n"
|
||||
" %s"
|
||||
1
account_bank_statement_import_ofx/models/__init__.py
Normal file
1
account_bank_statement_import_ofx/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_journal
|
||||
12
account_bank_statement_import_ofx/models/account_journal.py
Normal file
12
account_bank_statement_import_ofx/models/account_journal.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountJournal(models.Model):
|
||||
_inherit = "account.journal"
|
||||
|
||||
def _get_bank_statements_available_import_formats(self):
|
||||
""" Adds ofx to supported import formats.
|
||||
"""
|
||||
rslt = super()._get_bank_statements_available_import_formats()
|
||||
rslt.append("ofx")
|
||||
return rslt
|
||||
@@ -0,0 +1,7 @@
|
||||
* Odoo SA
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* Ronald Portier <rportier@therp.nl>
|
||||
* Sylvain LE GAL <https://twitter.com/legalsylvain>
|
||||
* Nicolas JEUDY <https://github.com/njeudy>
|
||||
* Le Filament <https://github.com/lefilament>
|
||||
4
account_bank_statement_import_ofx/readme/DESCRIPTION.rst
Normal file
4
account_bank_statement_import_ofx/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
This module adds support for the import of bank statements in `OFX format <https://en.wikipedia.org/wiki/Open_Financial_Exchange>`_.
|
||||
|
||||
Bank Statements may be generated containing a subset of the OFX information (only those transaction lines that are required for the
|
||||
creation of the Financial Accounting records).
|
||||
1
account_bank_statement_import_ofx/readme/INSTALL.rst
Normal file
1
account_bank_statement_import_ofx/readme/INSTALL.rst
Normal file
@@ -0,0 +1 @@
|
||||
This module requires the `ofxparse <https://pypi.org/project/ofxparse/>`_ python lib.
|
||||
BIN
account_bank_statement_import_ofx/static/description/icon.png
Executable file
BIN
account_bank_statement_import_ofx/static/description/icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
1
account_bank_statement_import_ofx/tests/__init__.py
Normal file
1
account_bank_statement_import_ofx/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import test_import_bank_statement
|
||||
@@ -0,0 +1,106 @@
|
||||
import base64
|
||||
import datetime
|
||||
|
||||
from odoo.modules.module import get_module_resource
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestOfxFile(TransactionCase):
|
||||
"""Tests for import bank statement ofx file format
|
||||
(account.bank.statement.import)
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(TestOfxFile, self).setUp()
|
||||
self.absi_model = self.env["account.bank.statement.import"]
|
||||
self.abs_model = self.env["account.bank.statement"]
|
||||
self.j_model = self.env["account.journal"]
|
||||
self.absl_model = self.env["account.bank.statement.line"]
|
||||
self.ia_model = self.env["ir.attachment"]
|
||||
cur = self.env.ref("base.USD")
|
||||
self.env.ref("base.main_company").currency_id = cur.id
|
||||
bank = self.env["res.partner.bank"].create(
|
||||
{
|
||||
"acc_number": "123456",
|
||||
"partner_id": self.env.ref("base.main_partner").id,
|
||||
"company_id": self.env.ref("base.main_company").id,
|
||||
"bank_id": self.env.ref("base.res_bank_1").id,
|
||||
}
|
||||
)
|
||||
self.env["account.journal"].create(
|
||||
{
|
||||
"name": "Bank Journal TEST OFX",
|
||||
"code": "BNK12",
|
||||
"type": "bank",
|
||||
"bank_account_id": bank.id,
|
||||
}
|
||||
)
|
||||
|
||||
bank_iban_ofx = self.env["res.partner.bank"].create(
|
||||
{
|
||||
"acc_number": "FR7630001007941234567890185",
|
||||
"partner_id": self.env.ref("base.main_partner").id,
|
||||
"company_id": self.env.ref("base.main_company").id,
|
||||
"bank_id": self.env.ref("base.res_bank_1").id,
|
||||
}
|
||||
)
|
||||
|
||||
self.env["account.journal"].create(
|
||||
{
|
||||
"name": "FR7630001007941234567890185",
|
||||
"code": "BNK13",
|
||||
"type": "bank",
|
||||
"bank_account_id": bank_iban_ofx.id,
|
||||
}
|
||||
)
|
||||
|
||||
def test_wrong_ofx_file_import(self):
|
||||
ofx_file_path = get_module_resource(
|
||||
"account_bank_statement_import_ofx",
|
||||
"tests/test_ofx_file/",
|
||||
"test_ofx_wrong.ofx",
|
||||
)
|
||||
ofx_file_wrong = base64.b64encode(open(ofx_file_path, "rb").read())
|
||||
attach = self.ia_model.create(
|
||||
{"name": "test_ofx_wrong.ofx", "datas": ofx_file_wrong}
|
||||
)
|
||||
bank_statement = self.absi_model.create(
|
||||
dict(attachment_ids=[(6, 0, [attach.id])])
|
||||
)
|
||||
self.assertFalse(bank_statement._check_ofx(data_file=ofx_file_wrong))
|
||||
|
||||
def test_ofx_file_import(self):
|
||||
ofx_file_path = get_module_resource(
|
||||
"account_bank_statement_import_ofx", "tests/test_ofx_file/", "test_ofx.ofx"
|
||||
)
|
||||
ofx_file = base64.b64encode(open(ofx_file_path, "rb").read())
|
||||
attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file})
|
||||
bank_statement = self.absi_model.create(
|
||||
dict(attachment_ids=[(6, 0, [attach.id])])
|
||||
)
|
||||
bank_statement.import_file()
|
||||
bank_st_record = self.abs_model.search([("name", "like", "123456")])[0]
|
||||
self.assertEqual(bank_st_record.balance_start, 2516.56)
|
||||
self.assertEqual(bank_st_record.balance_end_real, 2156.56)
|
||||
|
||||
line = self.absl_model.search(
|
||||
[("name", "=", "Agrolait"), ("statement_id", "=", bank_st_record.id)]
|
||||
)[0]
|
||||
self.assertEqual(line.ref, "219378")
|
||||
self.assertEqual(line.date, datetime.date(2013, 8, 24))
|
||||
|
||||
def test_check_journal_bank_account(self):
|
||||
ofx_file_path = get_module_resource(
|
||||
"account_bank_statement_import_ofx",
|
||||
"tests/test_ofx_file/",
|
||||
"test_ofx_iban.ofx",
|
||||
)
|
||||
ofx_file = base64.b64encode(open(ofx_file_path, "rb").read())
|
||||
attach = self.ia_model.create({"name": "test_ofx.ofx", "datas": ofx_file})
|
||||
bank_st = self.absi_model.create(dict(attachment_ids=[(6, 0, [attach.id])]))
|
||||
journal_iban_ofx = self.j_model.search(
|
||||
[("name", "=", "FR7630001007941234567890185")]
|
||||
)
|
||||
res = bank_st._check_journal_bank_account(journal_iban_ofx, "12345678901")
|
||||
self.assertTrue(res)
|
||||
bank_st.with_context(journal_id=journal_iban_ofx.id).import_file()
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<?OFX OFXHEADER="200" VERSION="211" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
|
||||
<OFX>
|
||||
<SIGNONMSGSRSV1>
|
||||
<SONRS>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<DTSERVER>20130831165153.000[-8:PST]</DTSERVER>
|
||||
<LANGUAGE>ENG</LANGUAGE>
|
||||
</SONRS>
|
||||
</SIGNONMSGSRSV1>
|
||||
<BANKMSGSRSV1>
|
||||
<STMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<STMTRS>
|
||||
<CURDEF>USD</CURDEF>
|
||||
<BANKACCTFROM>
|
||||
<BANKID>000000123</BANKID>
|
||||
<ACCTID>123456</ACCTID>
|
||||
<ACCTTYPE>CHECKING</ACCTTYPE>
|
||||
</BANKACCTFROM>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-80</TRNAMT>
|
||||
<FITID>219378</FITID>
|
||||
<NAME>Agrolait</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219379</FITID>
|
||||
<NAME>China Export</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-100</TRNAMT>
|
||||
<FITID>219380</FITID>
|
||||
<NAME>Axelor Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219381</FITID>
|
||||
<NAME>China Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>2156.56</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</STMTRS>
|
||||
</STMTTRNRS>
|
||||
</BANKMSGSRSV1>
|
||||
<CREDITCARDMSGSRSV1>
|
||||
<CCSTMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<CCSTMTRS>
|
||||
<CURDEF>USD</CURDEF>
|
||||
<CCACCTFROM>
|
||||
<ACCTID>123412341234</ACCTID>
|
||||
</CCACCTFROM>
|
||||
<BANKTRANLIST>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>-562.00</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</CCSTMTRS>
|
||||
</CCSTMTTRNRS>
|
||||
</CREDITCARDMSGSRSV1>
|
||||
</OFX>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<?OFX OFXHEADER="200" VERSION="211" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
|
||||
<OFX>
|
||||
<SIGNONMSGSRSV1>
|
||||
<SONRS>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<DTSERVER>20130831165153.000[-8:PST]</DTSERVER>
|
||||
<LANGUAGE>ENG</LANGUAGE>
|
||||
</SONRS>
|
||||
</SIGNONMSGSRSV1>
|
||||
<BANKMSGSRSV1>
|
||||
<STMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<STMTRS>
|
||||
<CURDEF>USD</CURDEF>
|
||||
<BANKACCTFROM>
|
||||
<BANKID>30001</BANKID>
|
||||
<BRANCHID>00794</BRANCHID>
|
||||
<ACCTID>12345678901</ACCTID>
|
||||
<ACCTTYPE>CHECKING</ACCTTYPE>
|
||||
</BANKACCTFROM>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-80</TRNAMT>
|
||||
<FITID>219378</FITID>
|
||||
<NAME>Agrolait</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219379</FITID>
|
||||
<NAME>China Export</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-100</TRNAMT>
|
||||
<FITID>219380</FITID>
|
||||
<NAME>Axelor Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219381</FITID>
|
||||
<NAME>China Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>2156.56</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</STMTRS>
|
||||
</STMTTRNRS>
|
||||
</BANKMSGSRSV1>
|
||||
<CREDITCARDMSGSRSV1>
|
||||
<CCSTMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<CCSTMTRS>
|
||||
<CURDEF>USD</CURDEF>
|
||||
<CCACCTFROM>
|
||||
<ACCTID>123412341234</ACCTID>
|
||||
</CCACCTFROM>
|
||||
<BANKTRANLIST>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>-562.00</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</CCSTMTRS>
|
||||
</CCSTMTTRNRS>
|
||||
</CREDITCARDMSGSRSV1>
|
||||
</OFX>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<?OFX OFXHEADER="200" VERSION="211" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
|
||||
<OFX>
|
||||
<SIGNONMSGSRSV1>
|
||||
<SONRS>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<DTSERVER>20130831165153.000[-8:PST]</DTSERVER>
|
||||
<LANGUAGE>ENG</LANGUAGE>
|
||||
</SONRS>
|
||||
</SIGNONMSGSRSV1>
|
||||
<BANKMSGSRSV1>
|
||||
<STMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<STMTRS>
|
||||
<!-- <CURDEF>USD</CURDEF>
|
||||
<BANKACCTFROM>
|
||||
<BANKID>000000123</BANKID>
|
||||
<ACCTID>123456</ACCTID>
|
||||
<ACCTTYPE>CHECKING</ACCTTYPE>
|
||||
</BANKACCTFROM> -->
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-80</TRNAMT>
|
||||
<FITID>219378</FITID>
|
||||
<NAME>Agrolait</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<!-- <DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219379</FITID> -->
|
||||
<NAME>China Export</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-100</TRNAMT>
|
||||
<FITID>219380</FITID>
|
||||
<NAME>Axelor Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<BANKTRANLIST>
|
||||
<DTSTART>20130801</DTSTART>
|
||||
<DTEND>20130831165153.000[-8:PST]</DTEND>
|
||||
<STMTTRN>
|
||||
<TRNTYPE>POS</TRNTYPE>
|
||||
<DTPOSTED>20130824080000</DTPOSTED>
|
||||
<TRNAMT>-90</TRNAMT>
|
||||
<FITID>219381</FITID>
|
||||
<NAME>China Scuba</NAME>
|
||||
</STMTTRN>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>2156.56</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</STMTRS>
|
||||
</STMTTRNRS>
|
||||
</BANKMSGSRSV1>
|
||||
<CREDITCARDMSGSRSV1>
|
||||
<CCSTMTTRNRS>
|
||||
<TRNUID>0</TRNUID>
|
||||
<STATUS>
|
||||
<CODE>0</CODE>
|
||||
<SEVERITY>INFO</SEVERITY>
|
||||
</STATUS>
|
||||
<CCSTMTRS>
|
||||
<CURDEF>USD</CURDEF>
|
||||
<CCACCTFROM>
|
||||
<ACCTID>123412341234</ACCTID>
|
||||
</CCACCTFROM>
|
||||
<BANKTRANLIST>
|
||||
</BANKTRANLIST>
|
||||
<LEDGERBAL>
|
||||
<BALAMT>-562.00</BALAMT>
|
||||
<DTASOF>20130831165153</DTASOF>
|
||||
</LEDGERBAL>
|
||||
</CCSTMTRS>
|
||||
</CCSTMTTRNRS>
|
||||
</CREDITCARDMSGSRSV1>
|
||||
</OFX>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_account_bank_statement_import_form" model="ir.ui.view">
|
||||
<field name="model">account.bank.statement.import</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_bank_statement_import.account_bank_statement_import_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//ul[@id='statement_format']" position="inside">
|
||||
<li>Open Financial Exchange (.OFX Money)</li>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
1
account_bank_statement_import_ofx/wizard/__init__.py
Normal file
1
account_bank_statement_import_ofx/wizard/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_bank_statement_import
|
||||
@@ -0,0 +1,101 @@
|
||||
import io
|
||||
import logging
|
||||
|
||||
from odoo import _, api, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
from odoo.addons.base_iban.models.res_partner_bank import (
|
||||
_map_iban_template,
|
||||
validate_iban,
|
||||
)
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from ofxparse import OfxParser
|
||||
except ImportError:
|
||||
_logger.debug("ofxparse not found.")
|
||||
OfxParser = None
|
||||
|
||||
|
||||
class AccountBankStatementImport(models.TransientModel):
|
||||
_inherit = "account.bank.statement.import"
|
||||
|
||||
def _check_journal_bank_account(self, journal, account_number):
|
||||
res = super()._check_journal_bank_account(journal, account_number)
|
||||
if not res:
|
||||
e_acc_num = journal.bank_account_id.sanitized_acc_number
|
||||
e_acc_num = e_acc_num.replace(" ", "")
|
||||
validate_iban(e_acc_num)
|
||||
country_code = e_acc_num[:2].lower()
|
||||
iban_template = _map_iban_template[country_code].replace(" ", "")
|
||||
e_acc_num = "".join(
|
||||
[c for c, t in zip(e_acc_num, iban_template) if t == "C"]
|
||||
)
|
||||
res = e_acc_num == account_number
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def _check_ofx(self, data_file):
|
||||
if not OfxParser:
|
||||
return False
|
||||
try:
|
||||
ofx = OfxParser.parse(io.BytesIO(data_file))
|
||||
except Exception as e:
|
||||
_logger.debug(e)
|
||||
return False
|
||||
return ofx
|
||||
|
||||
@api.model
|
||||
def _prepare_ofx_transaction_line(self, transaction):
|
||||
# Since ofxparse doesn't provide account numbers,
|
||||
# we cannot provide the key 'bank_account_id',
|
||||
# nor the key 'account_number'
|
||||
# If you read odoo10/addons/account_bank_statement_import/
|
||||
# account_bank_statement_import.py, it's the only 2 keys
|
||||
# we can provide to match a partner.
|
||||
name = transaction.payee
|
||||
if transaction.checknum:
|
||||
name += " " + transaction.checknum
|
||||
if transaction.memo:
|
||||
name += " : " + transaction.memo
|
||||
vals = {
|
||||
"date": transaction.date,
|
||||
"name": name,
|
||||
"ref": transaction.id,
|
||||
"amount": float(transaction.amount),
|
||||
"unique_import_id": transaction.id,
|
||||
}
|
||||
return vals
|
||||
|
||||
def _parse_file(self, data_file):
|
||||
ofx = self._check_ofx(data_file)
|
||||
if not ofx:
|
||||
return super()._parse_file(data_file)
|
||||
|
||||
transactions = []
|
||||
total_amt = 0.00
|
||||
try:
|
||||
for transaction in ofx.account.statement.transactions:
|
||||
vals = self._prepare_ofx_transaction_line(transaction)
|
||||
if vals:
|
||||
transactions.append(vals)
|
||||
total_amt += vals["amount"]
|
||||
except Exception as e:
|
||||
raise UserError(
|
||||
_(
|
||||
"The following problem occurred during import. "
|
||||
"The file might not be valid.\n\n %s"
|
||||
)
|
||||
# % e.message # flake8 B306 `BaseException.message`
|
||||
% e.args[0]
|
||||
)
|
||||
|
||||
balance = float(ofx.account.statement.balance)
|
||||
vals_bank_statement = {
|
||||
"name": ofx.account.number,
|
||||
"transactions": transactions,
|
||||
"balance_start": balance - total_amt,
|
||||
"balance_end_real": balance,
|
||||
}
|
||||
return ofx.account.statement.currency, ofx.account.number, [vals_bank_statement]
|
||||
@@ -0,0 +1 @@
|
||||
../../../../account_bank_statement_import_ofx
|
||||
6
setup/account_bank_statement_import_ofx/setup.py
Normal file
6
setup/account_bank_statement_import_ofx/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user