From a6f830b4b7da37ed4976ef059fa865b8fb2a3199 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 6 Dec 2016 12:41:23 +0100 Subject: [PATCH 1/3] 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 --- account_bank_statement_import_qif/README.rst | 52 +++++++++++------- account_bank_statement_import_qif/__init__.py | 4 +- .../__manifest__.py | 22 +++++--- .../account_bank_statement_import_qif.pot | 49 ----------------- account_bank_statement_import_qif/i18n/es.po | 4 +- .../tests/test_import_bank_statement.py | 40 ++++++++++---- .../{test_qif_file => tests}/test_qif.qif | 0 .../wizards/__init__.py | 4 ++ .../account_bank_statement_import_qif.py | 54 +++++++++++-------- ...account_bank_statement_import_qif_view.xml | 14 +++++ 10 files changed, 132 insertions(+), 111 deletions(-) delete mode 100644 account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot rename account_bank_statement_import_qif/{test_qif_file => tests}/test_qif.qif (100%) create mode 100644 account_bank_statement_import_qif/wizards/__init__.py rename account_bank_statement_import_qif/{ => wizards}/account_bank_statement_import_qif.py (59%) create mode 100644 account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml diff --git a/account_bank_statement_import_qif/README.rst b/account_bank_statement_import_qif/README.rst index 66411e6..5707836 100644 --- a/account_bank_statement_import_qif/README.rst +++ b/account_bank_statement_import_qif/README.rst @@ -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 `_. +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 -`here `_. - +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 * Laurent Mignon * Ronald Portier +* Pedro M. Baeza 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. diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index 3bf4df8..0796ed1 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -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 diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index 4c54418..1e2eb75 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -1,16 +1,24 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# 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', ], - 'auto_install': False, - 'installable': False, + '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 deleted file mode 100644 index 65c2bf0..0000000 --- a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot +++ /dev/null @@ -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 "" - diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 3872d17..769d74d 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -21,7 +21,7 @@ msgstr "" #: code:addons/account_bank_statement_import_qif/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 @@ -32,4 +32,4 @@ msgstr "Importar extracto bancario" #: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 #, python-format msgid "This file is either not a bank statement or is not correctly formed." -msgstr "" +msgstr "Este archivo no es un extracto bancario o no está correctamente formado." 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 index 5c13125..af0e1cf 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -1,4 +1,9 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# 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) diff --git a/account_bank_statement_import_qif/test_qif_file/test_qif.qif b/account_bank_statement_import_qif/tests/test_qif.qif similarity index 100% rename from account_bank_statement_import_qif/test_qif_file/test_qif.qif rename to account_bank_statement_import_qif/tests/test_qif.qif 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..f82d76e --- /dev/null +++ b/account_bank_statement_import_qif/wizards/__init__.py @@ -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 diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py similarity index 59% rename from account_bank_statement_import_qif/account_bank_statement_import_qif.py rename to account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index 0b9061e..1016bac 100644 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -1,20 +1,21 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# 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 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)
  • +
    +
    +
    + +
    From 2dbda338154af659da1c83106bac584e8f02663b Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Fri, 9 Dec 2016 19:13:45 -0500 Subject: [PATCH 2/3] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/de.po | 43 +++++++++++++++++++ account_bank_statement_import_qif/i18n/es.po | 23 ++++++---- account_bank_statement_import_qif/i18n/fi.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/fr.po | 25 +++++++---- .../i18n/fr_CH.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/gl.po | 41 ++++++++++++++++++ .../i18n/lt_LT.po | 21 +++++---- .../i18n/nb_NO.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/nl.po | 25 +++++++---- .../i18n/pt_BR.po | 21 +++++---- .../i18n/pt_PT.po | 42 ++++++++++++++++++ account_bank_statement_import_qif/i18n/sl.po | 21 +++++---- 12 files changed, 335 insertions(+), 50 deletions(-) create mode 100644 account_bank_statement_import_qif/i18n/de.po create mode 100644 account_bank_statement_import_qif/i18n/fi.po create mode 100644 account_bank_statement_import_qif/i18n/fr_CH.po create mode 100644 account_bank_statement_import_qif/i18n/gl.po create mode 100644 account_bank_statement_import_qif/i18n/nb_NO.po create mode 100644 account_bank_statement_import_qif/i18n/pt_PT.po 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..402117f --- /dev/null +++ b/account_bank_statement_import_qif/i18n/de.po @@ -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 , 2016 +# Thomas A. Jaeger , 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 , 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." diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 769d74d..3e39833 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -3,14 +3,15 @@ # * account_bank_statement_import_qif # # Translators: +# OCA Transbot , 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 \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 , 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,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 "No se puede descifrar el archivo QIF." @@ -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." +msgstr "" +"Este archivo no es un extracto bancario o no está correctamente formado." 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..89d4e3d --- /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" +"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 "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index d8df177..c532e95 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# zuher83 , 2015 +# OCA Transbot , 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 \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 , 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." 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..34a51e8 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fr_CH.po @@ -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 , 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" +"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 "" 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..d06a6c6 --- /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" +"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 "" diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po index 9efb9e6..077f83a 100644 --- a/account_bank_statement_import_qif/i18n/lt_LT.po +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Arminas Grigonis , 2015 +# OCA Transbot , 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 \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 , 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." 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..6223d0f --- /dev/null +++ b/account_bank_statement_import_qif/i18n/nb_NO.po @@ -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 , 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" +"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 "" diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po index e1e2fe5..10d6cee 100644 --- a/account_bank_statement_import_qif/i18n/nl.po +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Erwin van der Ploeg , 2015 +# OCA Transbot , 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 \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 , 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." diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po index abaf260..610a626 100644 --- a/account_bank_statement_import_qif/i18n/pt_BR.po +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# danimaribeiro , 2015 +# OCA Transbot , 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 \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 , 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." 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..f4e3106 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -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 , 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 , 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." diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po index 342e6c7..f9244f8 100644 --- a/account_bank_statement_import_qif/i18n/sl.po +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Matjaž Mozetič , 2015 +# OCA Transbot , 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č \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 , 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." From 6199102163f67a7eb6574f73a02692794b77186d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Nam=C3=A8che?= Date: Sun, 15 Jan 2017 11:28:30 +0100 Subject: [PATCH 3/3] [MIG] account_bank_statement_import_qif: Migrated to 10.0 --- account_bank_statement_import_qif/__manifest__.py | 2 +- .../tests/test_import_bank_statement.py | 4 ++-- .../wizards/account_bank_statement_import_qif.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index 1e2eb75..35f3e42 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -8,7 +8,7 @@ { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', 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 index af0e1cf..8614602 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -5,8 +5,8 @@ # Copyright 2016 Pedro M. Baeza # 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 +from odoo.tests.common import TransactionCase +from odoo.modules.module import get_module_resource class TestQifFile(TransactionCase): 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 index 1016bac..ee17f08 100644 --- 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 @@ -5,12 +5,12 @@ # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import dateutil.parser import StringIO +import dateutil.parser -from openerp.tools.translate import _ -from openerp import api, models -from openerp.exceptions import UserError +from odoo.tools.translate import _ +from odoo import api, models +from odoo.exceptions import UserError class AccountBankStatementImport(models.TransientModel):