mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[MIG] account_bank_statement_import_ofx : Migration to V12
This commit is contained in:
committed by
Alexis de Lattre
parent
862f5bf0fc
commit
413c084bb2
@@ -49,6 +49,7 @@ Contributors
|
||||
* Ronald Portier <rportier@therp.nl>
|
||||
* Sylvain LE GAL <https://twitter.com/legalsylvain>
|
||||
* Nicolas JEUDY <https://github.com/njeudy>
|
||||
* Le Filament <https://github.com/lefilament>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from . import models
|
||||
from . import wizard
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{
|
||||
'name': 'Import OFX Bank Statement',
|
||||
'category': 'Banking addons',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': 'Odoo SA,'
|
||||
'Akretion,'
|
||||
'La Louve,'
|
||||
'GRAP,'
|
||||
'Nicolas JEUDY,'
|
||||
'Le Filament,'
|
||||
'Odoo Community Association (OCA)',
|
||||
'website': 'https://odoo-community.org/',
|
||||
'depends': [
|
||||
|
||||
1
account_bank_statement_import_ofx/models/__init__.py
Normal file
1
account_bank_statement_import_ofx/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_journal
|
||||
14
account_bank_statement_import_ofx/models/account_journal.py
Normal file
14
account_bank_statement_import_ofx/models/account_journal.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountJournal(models.Model):
|
||||
_inherit = "account.journal"
|
||||
|
||||
def _get_bank_statements_available_import_formats(self):
|
||||
""" Adds ofx to supported import formats.
|
||||
"""
|
||||
rslt = super(
|
||||
AccountJournal,
|
||||
self)._get_bank_statements_available_import_formats()
|
||||
rslt.append('ofx')
|
||||
return rslt
|
||||
@@ -1,6 +1,7 @@
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.modules.module import get_module_resource
|
||||
import base64
|
||||
import datetime
|
||||
|
||||
|
||||
class TestOfxFile(TransactionCase):
|
||||
@@ -68,8 +69,8 @@ class TestOfxFile(TransactionCase):
|
||||
line = self.absl_model.search([
|
||||
('name', '=', 'Agrolait'),
|
||||
('statement_id', '=', bank_st_record.id)])[0]
|
||||
self.assertEquals(line.ref, '219378')
|
||||
self.assertEquals(line.date, '2013-08-24')
|
||||
self.assertEqual(line.ref, '219378')
|
||||
self.assertEqual(line.date, datetime.date(2013, 8, 24))
|
||||
|
||||
def test_check_journal_bank_account(self):
|
||||
ofx_file_path = get_module_resource(
|
||||
|
||||
Reference in New Issue
Block a user