Browse Source

[IMP] Extract description to README

Add OCA as author,
PEP8
pull/142/head
Laurent Mignon 9 years ago
committed by Nicolas JEUDY
parent
commit
07bcbad765
  1. 63
      account_bank_statement_import_ofx/README.rst
  2. 35
      account_bank_statement_import_ofx/__openerp__.py
  3. 4
      account_bank_statement_import_ofx/account_bank_statement_import_ofx.py
  4. 9
      account_bank_statement_import_ofx/tests/test_import_bank_statement.py

63
account_bank_statement_import_ofx/README.rst

@ -0,0 +1,63 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
Import OFX Bank Statement
=========================
This module allows you to import the machine readable OFX Files in Odoo: they are parsed and stored in human readable format in
Accounting \ Bank and Cash \ Bank Statements.
Bank Statements may be generated containing a subset of the OFX information (only those transaction lines that are required for the
creation of the Financial Accounting records).
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
Installation
============
The module requires one additional python lib:
* `ofxparse <http://pypi.python.org/pypi/ofxparse>`_
Known issues / Roadmap
======================
* None
Bug Tracker
===========
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**>`_.
Credits
=======
Contributors
------------
* Odoo SA
* Alexis de Lattre <alexis@via.ecp.fr>
* Laurent Mignon <laurent.mignon@acsone.eu>
* Ronald Portier <rportier@therp.nl>
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 http://odoo-community.org.

35
account_bank_statement_import_ofx/__openerp__.py

@ -1,32 +1,17 @@
# -*- encoding: utf-8 -*-
# noqa: This is a backport from Odoo. OCA has no control over style here.
# flake8: noqa
{
'name': 'Import OFX Bank Statement',
'category' : 'Accounting & Finance',
'category': 'Accounting & Finance',
'version': '1.0',
'author': 'OpenERP SA',
'depends': ['account_bank_statement_import'],
'demo': [],
'description' : """
Module to import OFX bank statements.
======================================
This module allows you to import the machine readable OFX Files in Odoo: they are parsed and stored in human readable format in
Accounting \ Bank and Cash \ Bank Statements.
Bank Statements may be generated containing a subset of the OFX information (only those transaction lines that are required for the
creation of the Financial Accounting records).
Backported from Odoo 9.0
When testing with the provided test file, make sure the demo data from the
base account_bank_statement_import module has been imported, or manually
create periods for the year 2013.
""",
'data' : [],
'depends': ['account_bank_statement_import'],
'demo': [],
'author': 'OpenERP SA,'
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/bank-statement-import',
'depends': [
'account_bank_statement_import'
],
'external_dependencies': {
'python': ['ofxparse'],
},
'auto_install': True,
'installable': True,
}

4
account_bank_statement_import_ofx/account_bank_statement_import_ofx.py

@ -16,7 +16,7 @@ except ImportError:
ofxparser = None
class account_bank_statement_import(models.TransientModel):
class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import'
@api.model
@ -33,7 +33,7 @@ class account_bank_statement_import(models.TransientModel):
def _parse_file(self, data_file):
ofx = self._check_ofx(data_file)
if not ofx:
return super(account_bank_statement_import, self)._parse_file(
return super(AccountBankStatementImport, self)._parse_file(
data_file)
transactions = []

9
account_bank_statement_import_ofx/tests/test_import_bank_statement.py

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# noqa: This is a backport from Odoo. OCA has no control over style here.
# flake8: noqa
from openerp.tests.common import TransactionCase
from openerp.modules.module import get_module_resource
@ -16,12 +14,6 @@ class TestOfxFile(TransactionCase):
self.bank_statement_model = self.env['account.bank.statement']
def test_ofx_file_import(self):
try:
from ofxparse import OfxParser as ofxparser
except ImportError:
# the Python library isn't installed on the server, the OFX import
# is unavailable and the test cannot be run
return True
ofx_file_path = get_module_resource(
'account_bank_statement_import_ofx',
'test_ofx_file', 'test_ofx.ofx')
@ -41,4 +33,3 @@ class TestOfxFile(TransactionCase):
self.assertEquals(
line.bank_account_id.id,
self.ref('account_bank_statement_import.ofx_partner_bank_1'))
Loading…
Cancel
Save