Browse Source

[MIG] account_bank_statement_import_qif: Migrated to 10.0

pull/129/head
Sébastien Namèche 8 years ago
committed by Pedro M. Baeza
parent
commit
dd55b4116a
  1. 2
      account_bank_statement_import_qif/__manifest__.py
  2. 4
      account_bank_statement_import_qif/tests/test_import_bank_statement.py
  3. 9
      account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py

2
account_bank_statement_import_qif/__openerp__.py → account_bank_statement_import_qif/__manifest__.py

@ -8,7 +8,7 @@
{ {
'name': 'Import QIF Bank Statements', 'name': 'Import QIF Bank Statements',
'category': 'Accounting', 'category': 'Accounting',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'author': 'OpenERP SA,' 'author': 'OpenERP SA,'
'Tecnativa,' 'Tecnativa,'
'Odoo Community Association (OCA)', 'Odoo Community Association (OCA)',

4
account_bank_statement_import_qif/tests/test_import_bank_statement.py

@ -5,8 +5,8 @@
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # 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): class TestQifFile(TransactionCase):

9
account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py

@ -5,12 +5,12 @@
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import dateutil.parser
import StringIO 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): class AccountBankStatementImport(models.TransientModel):
@ -20,7 +20,6 @@ class AccountBankStatementImport(models.TransientModel):
def _check_qif(self, data_file): def _check_qif(self, data_file):
return data_file.strip().startswith('!Type:') return data_file.strip().startswith('!Type:')
@api.model
def _parse_file(self, data_file): def _parse_file(self, data_file):
if not self._check_qif(data_file): if not self._check_qif(data_file):
return super(AccountBankStatementImport, self)._parse_file( return super(AccountBankStatementImport, self)._parse_file(

Loading…
Cancel
Save