mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[MIG] account_bank_statement_import_qif: Migration to 9.0
* Manifest reformat * Added license and contributors * Tests improved * Added matching partners * Added supported format in view OCA Transbot updated translations from Transifex
This commit is contained in:
committed by
Víctor Martínez
parent
80b8415c8e
commit
dbdd8cd347
@@ -1,35 +1,48 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
Module to import QIF bank statements.
|
||||
=====================================
|
||||
==========================
|
||||
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
|
||||
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.
|
||||
--------------
|
||||
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 has been initiated by a backport of the new framework developed
|
||||
by Odoo for V9 at its early stage. It's no more kept in sync with the V9 since
|
||||
it has reach a stage where maintaining a pure backport of 9.0 in 8.0 is not
|
||||
feasible anymore
|
||||
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.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
Usage
|
||||
=====
|
||||
|
||||
* None
|
||||
To use this module, you need to:
|
||||
|
||||
#. Go to *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/9.0
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_.
|
||||
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
|
||||
`here <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_bank_statement_import_ofx%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
If you spotted it first, help us smashing it by providing a detailed and
|
||||
welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
@@ -41,6 +54,7 @@ Contributors
|
||||
* Alexis de Lattre <alexis@via.ecp.fr>
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* Ronald Portier <rportier@therp.nl>
|
||||
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
@@ -55,4 +69,4 @@ 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 http://odoo-community.org.
|
||||
To contribute to this module, please visit https://odoo-community.org.
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import account_bank_statement_import_qif
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import wizards
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 Odoo S. A.
|
||||
# Copyright 2015 Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
# Copyright 2015 Ronald Portier <rportier@therp.nl>
|
||||
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Import QIF Bank Statement',
|
||||
'category': 'Banking addons',
|
||||
'version': '8.0.1.0.0',
|
||||
'name': 'Import QIF Bank Statements',
|
||||
'category': 'Accounting',
|
||||
'version': '9.0.1.0.0',
|
||||
'author': 'OpenERP SA,'
|
||||
'Tecnativa,'
|
||||
'Odoo Community Association (OCA)',
|
||||
'website': 'https://github.com/OCA/bank-statement-import',
|
||||
'images': [],
|
||||
'depends': [
|
||||
'account_bank_statement_import'
|
||||
'account_bank_statement_import',
|
||||
],
|
||||
'data': [
|
||||
'wizards/account_bank_statement_import_qif_view.xml',
|
||||
],
|
||||
'auto_install': False,
|
||||
'installable': True,
|
||||
'license': 'AGPL-3',
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# 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 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-06-08 12:01+0000\n"
|
||||
"PO-Revision-Date: 2015-06-08 12:01+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_qif
|
||||
#: help:account.bank.statement.import,journal_id:0
|
||||
msgid "Accounting journal related to the bank statement you're importing. It has be be manually chosen for statement formats which doesn't allow automatic journal detection (QIF for example)."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:54
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: field:account.bank.statement.import,hide_journal_field:0
|
||||
msgid "Hide the journal field in the view"
|
||||
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
|
||||
#: field:account.bank.statement.import,journal_id:0
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:98
|
||||
#, python-format
|
||||
msgid "This file is either not a bank statement or is not correctly formed."
|
||||
msgstr ""
|
||||
|
||||
43
account_bank_statement_import_qif/i18n/de.po
Normal file
43
account_bank_statement_import_qif/i18n/de.po
Normal file
@@ -0,0 +1,43 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Rudolf Schnapka <rs@techno-flex.de>, 2016
|
||||
# Thomas A. Jaeger <tj@jamotion.ch>, 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: Thomas A. Jaeger <tj@jamotion.ch>, 2016\n"
|
||||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: de\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:39
|
||||
#, 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 ""
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74
|
||||
#, 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."
|
||||
@@ -3,14 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-06-08 12:44+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"
|
||||
"POT-Creation-Date: 2016-12-09 17:00+0000\n"
|
||||
"PO-Revision-Date: 2016-12-09 17:00+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -18,10 +19,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr ""
|
||||
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
|
||||
@@ -29,7 +30,13 @@ msgid "Import Bank Statement"
|
||||
msgstr "Importar extracto bancario"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
|
||||
41
account_bank_statement_import_qif/i18n/fi.po
Normal file
41
account_bank_statement_import_qif/i18n/fi.po
Normal file
@@ -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 <jarmo.kortetjarvi@gmail.com>, 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 <jarmo.kortetjarvi@gmail.com>, 2017\n"
|
||||
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: fi\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:39
|
||||
#, 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:74
|
||||
#, python-format
|
||||
msgid "This file is either not a bank statement or is not correctly formed."
|
||||
msgstr ""
|
||||
@@ -3,15 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# zuher83 <zuher.elmas@gmail.com>, 2015
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-06-28 20:27+0000\n"
|
||||
"Last-Translator: zuher83 <zuher.elmas@gmail.com>\n"
|
||||
"Language-Team: French (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/fr/)\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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -19,7 +19,7 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr "Impossible de déchiffrer le fichier QIF."
|
||||
@@ -30,7 +30,14 @@ msgid "Import Bank Statement"
|
||||
msgstr "Importer Relevé Bancaire"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
msgstr ""
|
||||
"Ce fichier n'est pas un relevé bancaire ou n'est pas dans un format "
|
||||
"correcte."
|
||||
|
||||
41
account_bank_statement_import_qif/i18n/fr_CH.po
Normal file
41
account_bank_statement_import_qif/i18n/fr_CH.po
Normal file
@@ -0,0 +1,41 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: French (Switzerland) (https://www.transifex.com/oca/teams/23907/fr_CH/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: fr_CH\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:39
|
||||
#, 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:74
|
||||
#, python-format
|
||||
msgid "This file is either not a bank statement or is not correctly formed."
|
||||
msgstr ""
|
||||
41
account_bank_statement_import_qif/i18n/gl.po
Normal file
41
account_bank_statement_import_qif/i18n/gl.po
Normal file
@@ -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 <alejandrosantana@anubia.es>, 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 <alejandrosantana@anubia.es>, 2016\n"
|
||||
"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: gl\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:39
|
||||
#, 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:74
|
||||
#, python-format
|
||||
msgid "This file is either not a bank statement or is not correctly formed."
|
||||
msgstr ""
|
||||
@@ -3,15 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Arminas Grigonis <arminas@versada.lt>, 2015
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-07-23 13:36+0000\n"
|
||||
"Last-Translator: Arminas Grigonis <arminas@versada.lt>\n"
|
||||
"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/lt_LT/)\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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/teams/23907/lt_LT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -19,7 +19,7 @@ msgstr ""
|
||||
"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/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr "Neįmanoma iššifruoti QIF failo."
|
||||
@@ -30,7 +30,12 @@ msgid "Import Bank Statement"
|
||||
msgstr "Importuoti banko išrašą"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
|
||||
41
account_bank_statement_import_qif/i18n/nb_NO.po
Normal file
41
account_bank_statement_import_qif/i18n/nb_NO.po
Normal file
@@ -0,0 +1,41 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Imre Kristoffer Eilertsen <imreeil42@gmail.com>, 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 <imreeil42@gmail.com>, 2016\n"
|
||||
"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: nb_NO\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:39
|
||||
#, 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:74
|
||||
#, python-format
|
||||
msgid "This file is either not a bank statement or is not correctly formed."
|
||||
msgstr ""
|
||||
@@ -3,15 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Erwin van der Ploeg <erwin@bas-solutions.nl>, 2015
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-08-17 19:04+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg <erwin@bas-solutions.nl>\n"
|
||||
"Language-Team: Dutch (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/nl/)\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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -19,7 +19,7 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr "Kon het QIF bestand niet ontcijferen."
|
||||
@@ -30,7 +30,14 @@ msgid "Import Bank Statement"
|
||||
msgstr "Importeer bankafschrift"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
msgstr ""
|
||||
"Het bestand is of geen bankafschrift bestand of het bestand is niet in het "
|
||||
"correcte formaat."
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# danimaribeiro <danimaribeiro@gmail.com>, 2015
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-10-09 09:23+0000\n"
|
||||
"PO-Revision-Date: 2015-10-09 00:26+0000\n"
|
||||
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/pt_BR/)\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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -19,7 +19,7 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr "Não foi possível decifrar o arquivo QIF."
|
||||
@@ -30,7 +30,12 @@ msgid "Import Bank Statement"
|
||||
msgstr "Importar Extrato Bancário"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
|
||||
42
account_bank_statement_import_qif/i18n/pt_PT.po
Normal file
42
account_bank_statement_import_qif/i18n/pt_PT.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Pedro Castro Silva <pedrocs@sossia.pt>, 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: Pedro Castro Silva <pedrocs@sossia.pt>, 2016\n"
|
||||
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: pt_PT\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:39
|
||||
#, 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:74
|
||||
#, 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."
|
||||
@@ -3,15 +3,15 @@
|
||||
# * account_bank_statement_import_qif
|
||||
#
|
||||
# Translators:
|
||||
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bank-statement-import (8.0)\n"
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-24 21:51+0000\n"
|
||||
"PO-Revision-Date: 2015-06-28 05:24+0000\n"
|
||||
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
|
||||
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/sl/)\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 <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@@ -19,7 +19,7 @@ msgstr ""
|
||||
"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/account_bank_statement_import_qif.py:39
|
||||
#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39
|
||||
#, python-format
|
||||
msgid "Could not decipher the QIF file."
|
||||
msgstr "QIF datoteke ni bilo mogoče dešifrirati."
|
||||
@@ -30,7 +30,12 @@ msgid "Import Bank Statement"
|
||||
msgstr "Uvoz bančnega izpiska"
|
||||
|
||||
#. module: account_bank_statement_import_qif
|
||||
#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83
|
||||
#: 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:74
|
||||
#, 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."
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 Odoo S. A.
|
||||
# Copyright 2015 Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
# Copyright 2015 Ronald Portier <rportier@therp.nl>
|
||||
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp.tests.common import TransactionCase
|
||||
from openerp.modules.module import get_module_resource
|
||||
@@ -13,17 +18,32 @@ class TestQifFile(TransactionCase):
|
||||
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):
|
||||
from openerp.tools import float_compare
|
||||
qif_file_path = get_module_resource(
|
||||
'account_bank_statement_import_qif',
|
||||
'test_qif_file', 'test_qif.qif')
|
||||
'account_bank_statement_import_qif', 'tests', 'test_qif.qif',
|
||||
)
|
||||
qif_file = open(qif_file_path, 'rb').read().encode('base64')
|
||||
bank_statement_improt = self.statement_import_model.with_context(
|
||||
journal_id=self.ref('account.bank_journal')).create(
|
||||
dict(data_file=qif_file))
|
||||
bank_statement_improt.import_file()
|
||||
bank_statement = self.statement_line_model.search(
|
||||
[('name', '=', 'YOUR LOCAL SUPERMARKET')], limit=1)[0].statement_id
|
||||
assert float_compare(bank_statement.balance_end_real, -1896.09, 2) == 0
|
||||
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)
|
||||
|
||||
4
account_bank_statement_import_qif/wizards/__init__.py
Normal file
4
account_bank_statement_import_qif/wizards/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import account_bank_statement_import_qif
|
||||
@@ -1,20 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 Odoo S. A.
|
||||
# Copyright 2015 Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
# Copyright 2015 Ronald Portier <rportier@therp.nl>
|
||||
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import dateutil.parser
|
||||
import StringIO
|
||||
|
||||
from openerp.tools.translate import _
|
||||
from openerp import api, models
|
||||
from openerp.exceptions import Warning
|
||||
from openerp.exceptions import UserError
|
||||
|
||||
|
||||
class AccountBankStatementImport(models.TransientModel):
|
||||
_inherit = "account.bank.statement.import"
|
||||
|
||||
@api.model
|
||||
def _get_hide_journal_field(self):
|
||||
return self.env.context.get('journal_id') and True
|
||||
|
||||
@api.model
|
||||
def _check_qif(self, data_file):
|
||||
return data_file.strip().startswith('!Type:')
|
||||
@@ -24,7 +25,6 @@ class AccountBankStatementImport(models.TransientModel):
|
||||
if not self._check_qif(data_file):
|
||||
return super(AccountBankStatementImport, self)._parse_file(
|
||||
data_file)
|
||||
|
||||
try:
|
||||
file_data = ""
|
||||
for line in StringIO.StringIO(data_file).readlines():
|
||||
@@ -36,7 +36,7 @@ class AccountBankStatementImport(models.TransientModel):
|
||||
header = data_list[0].strip()
|
||||
header = header.split(":")[1]
|
||||
except:
|
||||
raise Warning(_('Could not decipher the QIF file.'))
|
||||
raise UserError(_('Could not decipher the QIF file.'))
|
||||
transactions = []
|
||||
vals_line = {}
|
||||
total = 0
|
||||
@@ -55,19 +55,10 @@ class AccountBankStatementImport(models.TransientModel):
|
||||
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:])
|
||||
# Since QIF doesn't provide account numbers, we'll have to
|
||||
# find res.partner and res.partner.bank here
|
||||
# (normal behavious is to provide 'account_number', which
|
||||
# the generic module uses to find partner/bank)
|
||||
banks = self.env['res.partner.bank'].search(
|
||||
[('owner_name', '=', line[1:])], limit=1)
|
||||
if banks:
|
||||
bank_account = banks[0]
|
||||
vals_line['bank_account_id'] = bank_account.id
|
||||
vals_line['partner_id'] = bank_account.partner_id.id
|
||||
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
|
||||
@@ -80,11 +71,28 @@ class AccountBankStatementImport(models.TransientModel):
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
raise Warning(_('This file is either not a bank statement or is '
|
||||
'not correctly formed.'))
|
||||
|
||||
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
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_bank_statement_import_view" 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>Quicken Interchange Format (.qif)</li>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user