diff --git a/addons/account_bank_statement_import_ofx/__openerp__.py b/addons/account_bank_statement_import_ofx/__openerp__.py index fd800511594a6367d48342b7e71b768bc9a7742b..57fff5258a0ecd6272e385f1eb95bffd7c066e47 100644 --- a/addons/account_bank_statement_import_ofx/__openerp__.py +++ b/addons/account_bank_statement_import_ofx/__openerp__.py @@ -17,7 +17,4 @@ creation of the Financial Accounting records). """, 'installable': True, 'auto_install': True, - 'external_dependencies' : { - 'python' : ['ofxparse'], - } } diff --git a/addons/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py b/addons/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py index 0a6855089ea035b79320ae199a0f02d6bb4ab7d9..f332cc18497593f2d6caea2782da0cf198bcc61f 100644 --- a/addons/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py +++ b/addons/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py @@ -5,24 +5,17 @@ import StringIO from openerp import api, models, _ from openerp.exceptions import UserError +from ofxparse import OfxParser _logger = logging.getLogger(__name__) -try: - from ofxparse import OfxParser as ofxparser -except ImportError: - _logger.warn("ofxparse not found, OFX parsing disabled.") - ofxparser = None - class AccountBankStatementImport(models.TransientModel): _inherit = 'account.bank.statement.import' def _check_ofx(self, file): - if ofxparser is None: - return False try: - ofx = ofxparser.parse(file) + ofx = OfxParser.parse(file) except: return False return ofx diff --git a/debian/control b/debian/control index 45c9f530631d1fc981f8b4423a9239b69b45ed03..e1e549b29f19b55ffd2219a9edab66702b87fb4d 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,7 @@ Depends: python-lxml, python-mako, python-mock, + python-ofxparse, python-openid, python-passlib, python-psutil, diff --git a/requirements.txt b/requirements.txt index ab1c1f3a18562e44b6a87dce36d69d8d6dee9f1b..59e6663e68d2e9fcca17a3be44b40aebe1b54daa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,6 +16,7 @@ greenlet==0.4.5 jcconv==0.2.3 lxml==3.4.1 mock==1.0.1 +ofxparse==0.14 passlib==1.6.2 psutil==2.2.0 psycogreen==1.0 diff --git a/setup.py b/setup.py index 27f170961d5edc390d665af6a7e2aa16b642b022..d361fc61b707c1fef3827356c2f81b3708696337 100644 --- a/setup.py +++ b/setup.py @@ -81,6 +81,7 @@ def py2exe_options(): 'mako', 'markupsafe', 'mock', + 'ofxparse', 'openerp', 'openid', 'passlib', @@ -139,6 +140,7 @@ setup( 'lxml', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/ 'mako', 'mock', + 'ofxparse', 'passlib', 'pillow', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/ 'psutil', # windows binary code.google.com/p/psutil/downloads/list diff --git a/setup/package.dfcentos b/setup/package.dfcentos index e524fcbd381294cb371dc787765ae7eac127f94e..fd363f6210e4645d6a0f5d0f58c2f1bc808e3e41 100644 --- a/setup/package.dfcentos +++ b/setup/package.dfcentos @@ -40,7 +40,7 @@ RUN yum install -d 0 -e 0 epel-release -y && \ postgresql-devel -y && \ yum clean all -RUN easy_install pyPdf vatnumber pydot psycogreen suds +RUN easy_install pyPdf vatnumber pydot psycogreen suds ofxparse # Postgres configuration RUN mkdir -p /var/lib/postgres/data diff --git a/setup/package.dfdebian b/setup/package.dfdebian index 4dfdc728e122055671bb57fafc8037bf14afd84f..7636e86f0d942b627e3d02cc5a59371dfe9d1b68 100644 --- a/setup/package.dfdebian +++ b/setup/package.dfdebian @@ -31,6 +31,7 @@ RUN apt-get update -qq && \ python-lxml \ python-mako \ python-mock \ + python-ofxparse \ python-openid \ python-passlib \ python-psutil \ diff --git a/setup/redhat/postinstall.sh b/setup/redhat/postinstall.sh index 76a94359d3a5aa35b3062a46f23407b199fb9d51..a0962cd62ff1212ada538767f0fe9004d5687547 100644 --- a/setup/redhat/postinstall.sh +++ b/setup/redhat/postinstall.sh @@ -54,4 +54,4 @@ ExecStart=/usr/bin/odoo.py --config=/etc/odoo/openerp-server.conf [Install] WantedBy=multi-user.target EOF -easy_install pyPdf vatnumber pydot psycogreen suds +easy_install pyPdf vatnumber pydot psycogreen suds ofxparse