diff --git a/account_bank_statement_import_qif/README.rst b/account_bank_statement_import_qif/README.rst new file mode 100644 index 0000000..f971f70 --- /dev/null +++ b/account_bank_statement_import_qif/README.rst @@ -0,0 +1,76 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================== +Import QIF bank statements +========================== + +This module allows you to import the machine readable QIF Files in Odoo: they +are parsed and stored in human readable format in +Accounting \ Bank and Cash \ Bank Statements. + +Important Note +-------------- +Because of the QIF format limitation, we cannot ensure the same transactions +aren't imported several times or handle multicurrency. Whenever possible, you +should use a more appropriate file format like OFX. + +The module was initiated as a backport of the new framework developed +by Odoo for V9 at its early stage. As Odoo has relicensed this module as +private inside its Odoo enterprise layer, now this one is maintained from the +original AGPL code. + +Usage +===== + +To use this module, you need to: + +#. Go to *Invoicing / Accounting* dashboard. +#. Click on *Import statement* from any of the bank journals. +#. Select a QIF file. +#. Press *Import*. + +.. 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 + +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. + +Credits +======= + +Contributors +------------ + +* Odoo SA +* Akretion + * Alexis de Lattre +* ACSONE A/V + * Laurent Mignon +* Therp + * Ronald Portier +* Tecnativa (https://www.tecnativa.com) + * Pedro M. Baeza + +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. diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py new file mode 100644 index 0000000..7588e52 --- /dev/null +++ b/account_bank_statement_import_qif/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models +from . import wizards diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py new file mode 100644 index 0000000..4eee423 --- /dev/null +++ b/account_bank_statement_import_qif/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Import QIF Bank Statements', + 'category': 'Accounting', + 'version': '12.0.1.0.0', + 'author': 'OpenERP SA,' + 'Tecnativa,' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/bank-statement-import', + 'depends': [ + 'account_bank_statement_import', + ], + 'data': [ + 'wizards/account_bank_statement_import_qif_view.xml', + ], + 'installable': True, + 'license': 'AGPL-3', +} diff --git a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot new file mode 100644 index 0000000..c814a25 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" + diff --git a/account_bank_statement_import_qif/i18n/de.po b/account_bank_statement_import_qif/i18n/de.po new file mode 100644 index 0000000..b31e354 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/de.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Konnte QIF-Datei nicht entziffern." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Kontoauszug importieren" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "Quicken Interchange Format (.qif)" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"Diese Datei ist entweder kein Kontoauszug oder ist fehlerhaft formatiert." diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po new file mode 100644 index 0000000..2e2b05a --- /dev/null +++ b/account_bank_statement_import_qif/i18n/es.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "No se puede descifrar el archivo QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar extracto bancario" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "Quicken Interchange Format (.qif)" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"Este archivo no es un extracto bancario o no est?? correctamente formado." diff --git a/account_bank_statement_import_qif/i18n/fa.po b/account_bank_statement_import_qif/i18n/fa.po new file mode 100644 index 0000000..4c6f88d --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fa.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Mehdi Zarrinkolah , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-08 08:27+0000\n" +"PO-Revision-Date: 2018-07-22 11:31+0000\n" +"Last-Translator: derKonig \n" +"Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n" +"Language: fa\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.0.1\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "???????? QIF ???????????????? ??????." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "???????? ???????????? ??????????" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "???????? ???????????? ???????? (.qif)" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "?????? ???????? ???? ???????????? ?????????? ???????? ???? ???? ?????????? ?????? ?????? ????????." diff --git a/account_bank_statement_import_qif/i18n/fi.po b/account_bank_statement_import_qif/i18n/fi.po new file mode 100644 index 0000000..677bb62 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fi.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Jarmo Kortetj??rvi , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-10 05:00+0000\n" +"PO-Revision-Date: 2016-12-10 05:00+0000\n" +"Last-Translator: Jarmo Kortetj??rvi , 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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Tuo pankkiaineisto" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po new file mode 100644 index 0000000..61384f2 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +# Lixon Jean-Yves , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-21 03:39+0000\n" +"PO-Revision-Date: 2018-03-21 03:39+0000\n" +"Last-Translator: Lixon Jean-Yves , 2017\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Impossible de d??chiffrer le fichier QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer un relev?? bancaire" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "Format d'??change avec Quicken (.qif)" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format correcte." diff --git a/account_bank_statement_import_qif/i18n/fr_CH.po b/account_bank_statement_import_qif/i18n/fr_CH.po new file mode 100644 index 0000000..c0bd8c0 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fr_CH.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer Relev??" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/gl.po b/account_bank_statement_import_qif/i18n/gl.po new file mode 100644 index 0000000..a3d16dd --- /dev/null +++ b/account_bank_statement_import_qif/i18n/gl.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Alejandro Santana , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Alejandro Santana , 2016\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar extracto bancario" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/hr.po b/account_bank_statement_import_qif/i18n/hr.po new file mode 100644 index 0000000..d5a0eb6 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/hr.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-08 08:27+0000\n" +"PO-Revision-Date: 2018-06-08 08:27+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\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" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Uvoz bankovnog izvoda" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po new file mode 100644 index 0000000..af826f1 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Ne??manoma i????ifruoti QIF failo." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importuoti banko i??ra????" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Failas arba ne banko i??ra??as arba suformuotas neteisingai." diff --git a/account_bank_statement_import_qif/i18n/nb_NO.po b/account_bank_statement_import_qif/i18n/nb_NO.po new file mode 100644 index 0000000..2f6d86a --- /dev/null +++ b/account_bank_statement_import_qif/i18n/nb_NO.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Imre Kristoffer Eilertsen , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Imre Kristoffer Eilertsen , 2016\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer bankutsagn" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po new file mode 100644 index 0000000..e89e0c4 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Kon het QIF bestand niet ontcijferen." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importeer bankafschrift" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"Het bestand is of geen bankafschrift bestand of het bestand is niet in het " +"correcte formaat." diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po new file mode 100644 index 0000000..7975924 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\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" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "N??o foi poss??vel decifrar o arquivo QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar Extrato Banc??rio" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "O arquivo n??o ?? um extrato banc??rio ou o formato ?? incorreto." diff --git a/account_bank_statement_import_qif/i18n/pt_PT.po b/account_bank_statement_import_qif/i18n/pt_PT.po new file mode 100644 index 0000000..b00b1ff --- /dev/null +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "N??o foi poss??vel decifrar o ficheiro QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar Extrato Banc??rio" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"O ficheiro n??o ?? um extrato banc??rio ou n??o est?? corretamente formatado." diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po new file mode 100644 index 0000000..020928a --- /dev/null +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\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_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "QIF datoteke ni bilo mogo??e de??ifrirati." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Uvoz ban??nega izpiska" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Ta datoteka ni ban??ni izpisek, ali pa ni pravilno oblikovana." diff --git a/account_bank_statement_import_qif/models/__init__.py b/account_bank_statement_import_qif/models/__init__.py new file mode 100644 index 0000000..ec99cd1 --- /dev/null +++ b/account_bank_statement_import_qif/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import account_journal diff --git a/account_bank_statement_import_qif/models/account_journal.py b/account_bank_statement_import_qif/models/account_journal.py new file mode 100644 index 0000000..37c00e9 --- /dev/null +++ b/account_bank_statement_import_qif/models/account_journal.py @@ -0,0 +1,13 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models, _ + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + def _get_bank_statements_available_import_formats(self): + res = super(AccountJournal, self).\ + _get_bank_statements_available_import_formats() + res.extend([_('.qif')]) + return res diff --git a/account_bank_statement_import_qif/static/description/icon.png b/account_bank_statement_import_qif/static/description/icon.png new file mode 100644 index 0000000..c5842c2 Binary files /dev/null and b/account_bank_statement_import_qif/static/description/icon.png differ diff --git a/account_bank_statement_import_qif/tests/__init__.py b/account_bank_statement_import_qif/tests/__init__.py new file mode 100644 index 0000000..25ee5b4 --- /dev/null +++ b/account_bank_statement_import_qif/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_import_bank_statement diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py new file mode 100644 index 0000000..b5269e2 --- /dev/null +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -0,0 +1,49 @@ +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase +from odoo.modules.module import get_module_resource +import base64 + + +class TestQifFile(TransactionCase): + """Tests for import bank statement qif file format + (account.bank.statement.import) + """ + + def setUp(self): + super(TestQifFile, self).setUp() + self.statement_import_model = self.env['account.bank.statement.import'] + self.statement_line_model = self.env['account.bank.statement.line'] + self.journal = self.env['account.journal'].create({ + 'name': 'Test bank journal', + 'code': 'TEST', + 'type': 'bank', + }) + self.partner = self.env['res.partner'].create({ + # Different case for trying insensitive case search + 'name': 'EPIC Technologies', + }) + + def test_qif_file_import(self): + qif_file_path = get_module_resource( + 'account_bank_statement_import_qif', 'tests', 'test_qif.qif', + ) + qif_file = base64.b64encode(open(qif_file_path, 'rb').read()) + wizard = self.statement_import_model.with_context( + journal_id=self.journal.id + ).create( + dict(data_file=qif_file) + ) + wizard.import_file() + statement = self.statement_line_model.search( + [('name', '=', 'YOUR LOCAL SUPERMARKET')], limit=1, + )[0].statement_id + self.assertAlmostEqual(statement.balance_end_real, -1896.09, 2) + line = self.statement_line_model.search( + [('name', '=', 'Epic Technologies')], limit=1, + ) + self.assertEqual(line.partner_id, self.partner) diff --git a/account_bank_statement_import_qif/tests/test_qif.qif b/account_bank_statement_import_qif/tests/test_qif.qif new file mode 100644 index 0000000..5388e6d --- /dev/null +++ b/account_bank_statement_import_qif/tests/test_qif.qif @@ -0,0 +1,21 @@ +!Type:Bank +D8/12/13 +T-1,000.00 +PDelta PC +^ +D8/15/13 +T-75.46 +PWalts Drugs +^ +D3/3/13 +T-379.00 +PEpic Technologies +^ +D3/4/13 +T-20.28 +PYOUR LOCAL SUPERMARKET +^ +D3/3/13 +T-421.35 +PSPRINGFIELD WATER UTILITY +^ diff --git a/account_bank_statement_import_qif/wizards/__init__.py b/account_bank_statement_import_qif/wizards/__init__.py new file mode 100644 index 0000000..448bfc6 --- /dev/null +++ b/account_bank_statement_import_qif/wizards/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py new file mode 100644 index 0000000..7f9e6fe --- /dev/null +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -0,0 +1,93 @@ +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import dateutil.parser + +from odoo.tools.translate import _ +from odoo import api, models +from odoo.exceptions import UserError + + +class AccountBankStatementImport(models.TransientModel): + _inherit = "account.bank.statement.import" + + @api.model + def _check_qif(self, data_file): + return data_file.strip().startswith(b'!Type:') + + def _parse_file(self, data_file): + if not self._check_qif(data_file): + return super(AccountBankStatementImport, self)._parse_file( + data_file) + try: + file_data = data_file.decode() + if '\r' in file_data: + data_list = file_data.split('\r') + else: + data_list = file_data.split('\n') + header = data_list[0].strip() + header = header.split(":")[1] + except: + raise UserError(_('Could not decipher the QIF file.')) + transactions = [] + vals_line = {} + total = 0 + if header in ("Bank", "CCard"): + vals_bank_statement = {} + for line in data_list: + line = line.strip() + if not line: + continue + if line[0] == 'D': # date of transaction + vals_line['date'] = dateutil.parser.parse( + line[1:], fuzzy=True).date() + elif line[0] == 'T': # Total amount + total += float(line[1:].replace(',', '')) + vals_line['amount'] = float(line[1:].replace(',', '')) + elif line[0] == 'N': # Check number + vals_line['ref'] = line[1:] + elif line[0] == 'P': # Payee + vals_line['name'] = ( + 'name' in vals_line and + line[1:] + ': ' + vals_line['name'] or line[1:] + ) + elif line[0] == 'M': # Memo + vals_line['name'] = ('name' in vals_line and + vals_line['name'] + ': ' + line[1:] or + line[1:]) + elif line[0] == '^' and vals_line: # end of item + transactions.append(vals_line) + vals_line = {} + elif line[0] == '\n': + transactions = [] + else: + pass + else: + raise UserError(_('This file is either not a bank statement or is ' + 'not correctly formed.')) + vals_bank_statement.update({ + 'balance_end_real': total, + 'transactions': transactions + }) + return None, None, [vals_bank_statement] + + def _complete_stmts_vals(self, stmt_vals, journal_id, account_number): + """Match partner_id if hasn't been deducted yet.""" + res = super(AccountBankStatementImport, self)._complete_stmts_vals( + stmt_vals, journal_id, account_number, + ) + # Since QIF doesn't provide account numbers (normal behaviour is to + # provide 'account_number', which the generic module uses to find + # the partner), we have to find res.partner through the name + partner_obj = self.env['res.partner'] + for statement in res: + for line_vals in statement['transactions']: + if not line_vals.get('partner_id') and line_vals.get('name'): + partner = partner_obj.search( + [('name', 'ilike', line_vals['name'])], limit=1, + ) + line_vals['partner_id'] = partner.id + return res diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml new file mode 100644 index 0000000..d6ab5b7 --- /dev/null +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml @@ -0,0 +1,14 @@ + + + + + account.bank.statement.import + + + +
  • Quicken Interchange Format (.qif)
  • +
    +
    +
    + +