diff --git a/account_banking/account_banking.py b/account_banking/account_banking.py index d37e5c3a5..a82eeec68 100644 --- a/account_banking/account_banking.py +++ b/account_banking/account_banking.py @@ -219,7 +219,6 @@ class account_banking_account_settings(orm.Model): 'default_credit_account_id': _default_credit_account_id, 'partner_bank_id': _default_partner_bank_id, } -account_banking_account_settings() class account_banking_imported_file(orm.Model): @@ -286,7 +285,6 @@ class account_banking_imported_file(orm.Model): 'date': fields.date.context_today, 'user_id': lambda self, cr, uid, context: uid, } -account_banking_imported_file() class account_bank_statement(orm.Model): diff --git a/account_banking/account_banking_demo.xml b/account_banking/account_banking_demo.xml deleted file mode 100644 index 83b8ebb28..000000000 --- a/account_banking/account_banking_demo.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Tiny S.p.r.l - - - 301915554082 - bank - - - - - The-design Company - - - 050000000017 - iban - - - - diff --git a/account_banking/account_banking_view.xml b/account_banking/account_banking_view.xml index 5c819ca8d..5b357e794 100644 --- a/account_banking/account_banking_view.xml +++ b/account_banking/account_banking_view.xml @@ -393,7 +393,7 @@ - + account.bank.statement.line.search account.bank.statement.line @@ -433,8 +433,8 @@ + action="action_bank_statement_line_tree" + id="menu_bank_statement_line_tree" + parent="account.menu_finance_bank_and_cash" sequence="8"/> diff --git a/account_banking/banking_import_transaction.py b/account_banking/banking_import_transaction.py index eb33ca6d1..a05ec2064 100644 --- a/account_banking/banking_import_transaction.py +++ b/account_banking/banking_import_transaction.py @@ -29,9 +29,9 @@ from openerp.osv import orm, fields from openerp import netsvc from openerp.tools.translate import _ from openerp.addons.decimal_precision import decimal_precision as dp -from openerp.addons.account_banking.parsers import models -from openerp.addons.account_banking.parsers import convert -from openerp.addons.account_banking.wizard import banktools +from .parsers import models +from .parsers import convert +from .wizard import banktools bt = models.mem_bank_transaction diff --git a/account_banking/parsers/convert.py b/account_banking/parsers/convert.py index 1bbac3a99..d13192b70 100644 --- a/account_banking/parsers/convert.py +++ b/account_banking/parsers/convert.py @@ -43,14 +43,15 @@ def date2date(datestr, fromfmt='%d/%m/%y', tofmt='%Y-%m-%d'): ''' return date2str(str2date(datestr, fromfmt), tofmt) -_SWIFT = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" - "/-?:().,'+ ") - def to_swift(astr, schemes=('utf-8', 'latin-1', 'ascii')): ''' Reduce a string to SWIFT format ''' + _SWIFT = ( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + "/-?:().,'+ " + ) if not isinstance(astr, unicode): for scheme in schemes: try: diff --git a/account_banking/parsers/models.py b/account_banking/parsers/models.py index f5693aaf0..b061b1218 100644 --- a/account_banking/parsers/models.py +++ b/account_banking/parsers/models.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (). @@ -262,7 +262,7 @@ class mem_bank_transaction(object): setattr(self, attr, '') self.remote_owner_address = [] - def copy(self): # noqa: W8106 + def copy(self): # pylint: disable=W8106 ''' Return a copy of self ''' diff --git a/account_banking/res_partner_bank.py b/account_banking/res_partner_bank.py index 960da0873..a660c96e9 100644 --- a/account_banking/res_partner_bank.py +++ b/account_banking/res_partner_bank.py @@ -19,7 +19,7 @@ # ############################################################################## from openerp.osv import orm -from openerp.addons.account_banking import sepa +from . import sepa class ResPartnerBank(orm.Model): diff --git a/account_banking/sepa/iban.py b/account_banking/sepa/iban.py index 8f252567f..d3b8e4abe 100644 --- a/account_banking/sepa/iban.py +++ b/account_banking/sepa/iban.py @@ -292,7 +292,7 @@ class IBAN(str): @classmethod def create(cls, BIC=None, countrycode=None, BBAN=None, bankcode=None, - branchcode=None, account=None): # noqa: W8106 + branchcode=None, account=None): # pylint: disable=W8106 ''' Create a IBAN number from a BBAN and a country code. Optionaly create a BBAN from BBAN components before generation. diff --git a/account_banking/sepa/postalcode.py b/account_banking/sepa/postalcode.py index c01a6aaa5..adb77c805 100644 --- a/account_banking/sepa/postalcode.py +++ b/account_banking/sepa/postalcode.py @@ -183,5 +183,6 @@ class PostalCode(object): return cls._formats[iso].get(str_) return '' + get = PostalCode.get split = PostalCode.split diff --git a/account_banking/static/src/js/account_banking.js b/account_banking/static/src/js/account_banking.js index 3ffa7564a..23e86d7e3 100644 --- a/account_banking/static/src/js/account_banking.js +++ b/account_banking/static/src/js/account_banking.js @@ -1,7 +1,7 @@ /*############################################################################ # # Copyright (C) 2013 Therp BV (). -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -16,33 +16,26 @@ # along with this program. If not, see . # ############################################################################*/ - -openerp.account_banking = function(instance) -{ +openerp.account_banking = function(instance) { var _t = instance.web._t; instance.web.Dialog.include( { - close: function() - { + close: function() { this._super.apply(this, arguments); - if (this.dialog_title == _t("Match transaction")) - { + if (this.dialog_title == _t("Match transaction")) { // The match wizard can create or unlink a statement line // Force a reload of the view so that the correct lines // are shown. var parent = this.getParent(); - if (parent) - { + if (parent) { var child = this.getParent().getChildren()[0]; if (child.views) { - _.each(child.views, function(view) - { - if (view && view.controller) - { - view.controller.reload(); - } - } - ); + _.each(child.views, function(view) { + if (view && view.controller) { + view.controller.reload(); + } + } + ); } } } diff --git a/account_banking/wizard/bank_import.py b/account_banking/wizard/bank_import.py index 7f3d7f140..bebd823a1 100644 --- a/account_banking/wizard/bank_import.py +++ b/account_banking/wizard/bank_import.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (). @@ -29,19 +29,20 @@ This module contains the business logic of the wizard account_banking_import. The parsing is done in the parser modules. Every parser module is required to use parser.models as a mean of communication with the business logic. ''' - import base64 import datetime from StringIO import StringIO from zipfile import ZipFile, BadZipfile # BadZipFile in Python >= 3.2 + from openerp.osv import orm, fields from openerp.tools.translate import _ -from openerp.addons.account_banking.parsers import models -from openerp.addons.account_banking.parsers import convert -from openerp.addons.account_banking.struct import struct -from openerp.addons.account_banking.wizard import banktools from openerp.addons.decimal_precision import decimal_precision as dp +from ..parsers import models +from ..parsers import convert +from ..struct import struct +from . import banktools + bt = models.mem_bank_transaction # This variable is used to match supplier invoices with an invoice date after diff --git a/account_banking/wizard/banktools.py b/account_banking/wizard/banktools.py index 995bcdfa9..814d36402 100644 --- a/account_banking/wizard/banktools.py +++ b/account_banking/wizard/banktools.py @@ -20,8 +20,8 @@ ############################################################################## from openerp.tools.translate import _ -from openerp.addons.account_banking import sepa -from openerp.addons.account_banking.struct import struct +from .. import sepa +from ..struct import struct __all__ = [ 'get_period', diff --git a/account_banking/wizard/link_partner.py b/account_banking/wizard/link_partner.py index 2a10a7bd3..7ba6c6e09 100644 --- a/account_banking/wizard/link_partner.py +++ b/account_banking/wizard/link_partner.py @@ -18,11 +18,11 @@ # along with this program. If not, see . # ############################################################################## +import ast from openerp.osv import orm, fields from openerp.tools.translate import _ -from openerp.addons.account_banking.wizard import banktools -import ast +from . import banktools class link_partner(orm.TransientModel): diff --git a/account_banking_fi_patu/__init__.py b/account_banking_fi_patu/__init__.py index 3d20640b5..11c7f5495 100644 --- a/account_banking_fi_patu/__init__.py +++ b/account_banking_fi_patu/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 Sami Haahtinen (). @@ -25,5 +25,4 @@ # along with this program. If not, see . # ############################################################################## - from . import patu diff --git a/account_banking_fi_patu/__openerp__.py b/account_banking_fi_patu/__openerp__.py index 261725420..11ed8a91c 100644 --- a/account_banking_fi_patu/__openerp__.py +++ b/account_banking_fi_patu/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 Sami Haahtinen (). @@ -24,10 +25,9 @@ # along with this program. If not, see . # ############################################################################## - { 'name': 'Account Banking PATU module', - 'version': '0.62', + 'version': '7.0.0.62.1', 'license': 'AGPL-3', 'author': "Sami Haahtinen,Odoo Community Association (OCA)", 'website': 'http://ressukka.net', diff --git a/account_banking_fi_patu/parser.py b/account_banking_fi_patu/parser.py index 43420d46b..02167621c 100644 --- a/account_banking_fi_patu/parser.py +++ b/account_banking_fi_patu/parser.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# encoding: utf-8 +# -*- coding: utf-8 -*- """Parser for PATU format files""" import re import datetime @@ -249,5 +248,6 @@ def main(): """ parse_file("myinput.nda") + if __name__ == '__main__': main() diff --git a/account_banking_fi_patu/patu.py b/account_banking_fi_patu/patu.py index ea4279d1f..60fc6924f 100644 --- a/account_banking_fi_patu/patu.py +++ b/account_banking_fi_patu/patu.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 Sami Haahtinen (). @@ -19,14 +19,13 @@ # along with this program. If not, see . # ############################################################################## - """ This parser implements the PATU format support. PATU format is a generic format used by finnish banks. """ from openerp.addons.account_banking.parsers import models from openerp.tools.translate import _ -from openerp.addons.account_banking_fi_patu.parser import PatuParser +from .parser import PatuParser __all__ = ['Parser'] diff --git a/account_banking_fr_lcr/__init__.py b/account_banking_fr_lcr/__init__.py index 119fec429..37f4cdb58 100644 --- a/account_banking_fr_lcr/__init__.py +++ b/account_banking_fr_lcr/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # French Letter of Change module for OpenERP diff --git a/account_banking_fr_lcr/__openerp__.py b/account_banking_fr_lcr/__openerp__.py index 66daf6a90..303d9c5a4 100644 --- a/account_banking_fr_lcr/__openerp__.py +++ b/account_banking_fr_lcr/__openerp__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # French Letter of Change module for OpenERP @@ -19,11 +19,10 @@ # along with this program. If not, see . # ############################################################################## - { 'name': 'French Letter of Change', 'summary': 'Create French LCR CFONB files', - 'version': '0.1', + 'version': '7.0.0.1.1', 'license': 'AGPL-3', 'author': "Akretion,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com', diff --git a/account_banking_fr_lcr/account_banking_lcr.py b/account_banking_fr_lcr/account_banking_lcr.py index 9af79507a..a2573b2ac 100644 --- a/account_banking_fr_lcr/account_banking_lcr.py +++ b/account_banking_fr_lcr/account_banking_lcr.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # French Letter of Change module for OpenERP diff --git a/account_banking_fr_lcr/wizard/__init__.py b/account_banking_fr_lcr/wizard/__init__.py index 5cd45758a..0949e65dc 100644 --- a/account_banking_fr_lcr/wizard/__init__.py +++ b/account_banking_fr_lcr/wizard/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # French Letter of Change module for OpenERP diff --git a/account_banking_fr_lcr/wizard/export_lcr.py b/account_banking_fr_lcr/wizard/export_lcr.py index 698ee2a02..d417991db 100644 --- a/account_banking_fr_lcr/wizard/export_lcr.py +++ b/account_banking_fr_lcr/wizard/export_lcr.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # French Letter of Change module for OpenERP diff --git a/account_banking_make_deposit/__openerp__.py b/account_banking_make_deposit/__openerp__.py index 365eed8ca..3df74236b 100644 --- a/account_banking_make_deposit/__openerp__.py +++ b/account_banking_make_deposit/__openerp__.py @@ -61,8 +61,9 @@ This module is seen as a prerequisite to support efficient Bank Account Statement Reconciliation found in the US and other countries. ''', 'category': 'Generic Modules/Accounting', - 'version': '1.4', - 'author': 'Novapoint Group LLC', + 'version': '7.0.1.4.1', + 'author': 'Novapoint Group LLC,Odoo Community Association (OCA)', + 'license': 'AGPL-3', 'website': 'www.novapointgroup.com', 'depends': [ 'account_cancel', @@ -71,11 +72,8 @@ Statement Reconciliation found in the US and other countries. 'data': [ 'security/account_banking_make_deposit_security.xml', 'security/ir.model.access.csv', - 'wizard/add_deposit_items_view.xml', - 'report/deposit_ticket.xml', - 'views/account_move_line.xml', 'views/deposit_method.xml', 'views/deposit_ticket.xml', @@ -83,7 +81,6 @@ Statement Reconciliation found in the US and other countries. 'demo': [ 'demo/deposit_method.xml' ], - 'test': [], 'active': False, 'installable': True, } diff --git a/account_banking_make_deposit/report/deposit_ticket.py b/account_banking_make_deposit/report/deposit_ticket.py index 2407b8b7f..3f4b31130 100644 --- a/account_banking_make_deposit/report/deposit_ticket.py +++ b/account_banking_make_deposit/report/deposit_ticket.py @@ -34,6 +34,7 @@ class deposit_ticket_webkit(report_sxw.rml_parse): 'uid': uid, }) + report_sxw.report_sxw( 'report.deposit.ticket.webkit', 'deposit.ticket', diff --git a/account_banking_mandate/__init__.py b/account_banking_mandate/__init__.py index 6a33af43c..a1976dae6 100644 --- a/account_banking_mandate/__init__.py +++ b/account_banking_mandate/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP diff --git a/account_banking_mandate/__openerp__.py b/account_banking_mandate/__openerp__.py index 37868d350..ccf339a58 100644 --- a/account_banking_mandate/__openerp__.py +++ b/account_banking_mandate/__openerp__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP @@ -23,7 +23,7 @@ { 'name': 'Account Banking Mandate', 'summary': 'Banking mandates', - 'version': '0.1', + 'version': '7.0.0.1.1', 'license': 'AGPL-3', 'author': "Compassion CH,Odoo Community Association (OCA)", 'website': 'http://www.compassion.ch', @@ -38,7 +38,6 @@ 'data/mandate_reference_sequence.xml', 'security/ir.model.access.csv', ], - 'demo': [], 'test': ['test/banking_mandate.yml'], 'description': ''' This module adds a generic model for banking mandates. diff --git a/account_banking_mandate/model/__init__.py b/account_banking_mandate/model/__init__.py index 247282be5..c67da1282 100644 --- a/account_banking_mandate/model/__init__.py +++ b/account_banking_mandate/model/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP diff --git a/account_banking_mandate/model/account_banking_mandate.py b/account_banking_mandate/model/account_banking_mandate.py index dcb8e9787..4da35c9e8 100644 --- a/account_banking_mandate/model/account_banking_mandate.py +++ b/account_banking_mandate/model/account_banking_mandate.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP @@ -160,8 +160,10 @@ class mandate(orm.Model): to_validate_ids = [] for mandate in self.browse(cr, uid, ids, context=context): if mandate.state != 'draft': - raise orm.except_orm('StateError', - _('Mandate should be in draft state')) + raise orm.except_orm( + _('StateError'), + _('Mandate should be in draft state') + ) to_validate_ids.append(mandate.id) self.write( cr, uid, to_validate_ids, {'state': 'valid'}, context=context) @@ -171,9 +173,10 @@ class mandate(orm.Model): to_cancel_ids = [] for mandate in self.browse(cr, uid, ids, context=context): if mandate.state not in ('draft', 'valid'): - raise orm.except_orm('StateError', - _('Mandate should be in draft or valid ' - 'state')) + raise orm.except_orm( + _('StateError'), + _('Mandate should be in draft or valid state') + ) to_cancel_ids.append(mandate.id) self.write( cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context) @@ -186,8 +189,10 @@ class mandate(orm.Model): to_draft_ids = [] for mandate in self.browse(cr, uid, ids, context=context): if mandate.state != 'cancel': - raise orm.except_orm('StateError', - _('Mandate should be in cancel state')) + raise orm.except_orm( + _('StateError'), + _('Mandate should be in cancel state') + ) to_draft_ids.append(mandate.id) self.write( cr, uid, to_draft_ids, {'state': 'draft'}, context=context) diff --git a/account_banking_mandate/model/invoice.py b/account_banking_mandate/model/invoice.py index 400cb75bd..6970a3895 100644 --- a/account_banking_mandate/model/invoice.py +++ b/account_banking_mandate/model/invoice.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP diff --git a/account_banking_mandate/model/partner_bank.py b/account_banking_mandate/model/partner_bank.py index 6d1b2b9f9..8340854dc 100644 --- a/account_banking_mandate/model/partner_bank.py +++ b/account_banking_mandate/model/partner_bank.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP @@ -20,9 +20,7 @@ # along with this program. If not, see . # ############################################################################## - from openerp.osv import orm, fields -from openerp.tools.translate import _ class res_partner_bank(orm.Model): @@ -31,8 +29,9 @@ class res_partner_bank(orm.Model): _columns = { 'mandate_ids': fields.one2many( 'account.banking.mandate', 'partner_bank_id', - _('Banking Mandates'), - help=_('Banking mandates represents an authorization that the ' - 'bank account owner gives to a company for a specific ' - 'operation')), + 'Banking Mandates', + help='Banking mandates represents an authorization that the ' + 'bank account owner gives to a company for a specific ' + 'operation' + ), } diff --git a/account_banking_mandate/model/payment_line.py b/account_banking_mandate/model/payment_line.py index 6baac690a..44a25f710 100644 --- a/account_banking_mandate/model/payment_line.py +++ b/account_banking_mandate/model/payment_line.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # Mandate module for openERP diff --git a/account_banking_mandate/view/account_banking_mandate_view.xml b/account_banking_mandate/view/account_banking_mandate_view.xml index bd93eb127..a8a4a4bc0 100644 --- a/account_banking_mandate/view/account_banking_mandate_view.xml +++ b/account_banking_mandate/view/account_banking_mandate_view.xml @@ -6,117 +6,117 @@ --> - - view.mandate.form - account.banking.mandate - -
-
-
- -
-

- -

-
- - - - - - - - - - - -
-
- - -
-
-
-
+ + view.mandate.form + account.banking.mandate + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + +
+
+ + +
+
+
+
- - view.mandate.tree - account.banking.mandate - - - - - - - - - - - + + view.mandate.tree + account.banking.mandate + + + + + + + + + + + - - view.mandate.search - account.banking.mandate - - - - - - - - - - - - - Banking Mandates - account.banking.mandate - form - tree,form - -

- Click to create a new Banking Mandate. -

- A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account. -

-
-
+ + view.mandate.search + account.banking.mandate + + + + + + + + + + - + + Banking Mandates + account.banking.mandate + form + tree,form + +

+ Click to create a new Banking Mandate. +

+ A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account. +

+
+
- - - Mandate Validated - account.banking.mandate - - Banking Mandate Validated - + - - Mandate Expired - account.banking.mandate - - Banking Mandate has Expired - + + + Mandate Validated + account.banking.mandate + + Banking Mandate Validated + - - Mandate Cancelled - account.banking.mandate - - Banking Mandate Cancelled - + + Mandate Expired + account.banking.mandate + + Banking Mandate has Expired + + + + Mandate Cancelled + account.banking.mandate + + Banking Mandate Cancelled +
diff --git a/account_banking_mt940/__init__.py b/account_banking_mt940/__init__.py index bb289e723..7b65f84ff 100644 --- a/account_banking_mt940/__init__.py +++ b/account_banking_mt940/__init__.py @@ -1,21 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import mt940 diff --git a/account_banking_mt940/__openerp__.py b/account_banking_mt940/__openerp__.py index c6468e3ed..a9bd129d7 100644 --- a/account_banking_mt940/__openerp__.py +++ b/account_banking_mt940/__openerp__.py @@ -1,26 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "MT940", - "version": "1.0", + "version": "7.0.1.0.1", + 'license': 'AGPL-3', "author": "Therp BV,Odoo Community Association (OCA)", "complexity": "expert", "description": """ @@ -36,18 +20,7 @@ See account_banking_nl_ing_mt940 for an example on how to use it. "depends": [ 'account_banking', ], - "data": [ - ], - "js": [ - ], - "css": [ - ], - "qweb": [ - ], "auto_install": False, "installable": True, "application": False, - "external_dependencies": { - 'python': [], - }, } diff --git a/account_banking_mt940/mt940.py b/account_banking_mt940/mt940.py index d1aa6e408..b3408017d 100644 --- a/account_banking_mt940/mt940.py +++ b/account_banking_mt940/mt940.py @@ -1,25 +1,6 @@ -#!/usr/bin/env python2 # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """ Parser for MT940 format files """ @@ -47,7 +28,7 @@ except ImportError: class MT940(object): - '''Inherit this class in your account_banking.parsers.models.parser, + """Inherit this class in your account_banking.parsers.models.parser, define functions to handle the tags you need to handle and adjust static variables as needed. @@ -57,11 +38,11 @@ class MT940(object): At least, you should override handle_tag_61 and handle_tag_86. Don't forget to call super. handle_tag_* functions receive the remainder of the the line (that is, - without ':XX:') and are supposed to write into self.current_transaction''' + without ':XX:') and are supposed to write into self.current_transaction""" header_lines = 3 - '''One file can contain multiple statements, each with its own poorly - documented header. For now, the best thing to do seems to skip that''' + """One file can contain multiple statements, each with its own poorly + documented header. For now, the best thing to do seems to skip that""" footer_regex = '^-}$' footer_regex = '^-XXX$' @@ -111,41 +92,41 @@ class MT940(object): return self.statements def append_continuation_line(self, cr, line, continuation_line): - '''append a continuation line for a multiline record. - Override and do data cleanups as necessary.''' + """append a continuation line for a multiline record. + Override and do data cleanups as necessary.""" return line + continuation_line def create_statement(self, cr): - '''create a mem_bank_statement - override if you need a custom - implementation''' + """create a mem_bank_statement - override if you need a custom + implementation""" return mem_bank_statement() def create_transaction(self, cr): - '''create a mem_bank_transaction - override if you need a custom - implementation''' + """create a mem_bank_transaction - override if you need a custom + implementation""" return mem_bank_transaction() def is_footer(self, cr, line): - '''determine if a line is the footer of a statement''' + """determine if a line is the footer of a statement""" return line and bool(re.match(self.footer_regex, line)) def is_tag(self, cr, line): - '''determine if a line has a tag''' + """determine if a line has a tag""" return line and bool(re.match(self.tag_regex, line)) def handle_header(self, cr, line, iterator): - '''skip header lines, create current statement''' + """skip header lines, create current statement""" for i in range(self.header_lines): iterator.next() self.current_statement = self.create_statement(cr) def handle_footer(self, cr, line, iterator): - '''add current statement to list, reset state''' + """add current statement to list, reset state""" self.statements.append(self.current_statement) self.current_statement = None def handle_record(self, cr, line): - '''find a function to handle the record represented by line''' + """find a function to handle the record represented by line""" tag_match = re.match(self.tag_regex, line) tag = tag_match.group(0).strip(':') if not hasattr(self, 'handle_tag_%s' % tag): @@ -156,20 +137,20 @@ class MT940(object): handler(cr, line[tag_match.end():]) def handle_tag_20(self, cr, data): - '''ignore reference number''' + """ignore reference number""" pass def handle_tag_25(self, cr, data): - '''get account owner information''' + """get account owner information""" self.current_statement.local_account = data def handle_tag_28C(self, cr, data): - '''get sequence number _within_this_batch_ - this alone - doesn't provide a unique id!''' + """get sequence number _within_this_batch_ - this alone + doesn't provide a unique id!""" self.current_statement.id = data def handle_tag_60F(self, cr, data): - '''get start balance and currency''' + """get start balance and currency""" self.current_statement.local_currency = data[7:10] self.current_statement.date = str2date(data[1:7]) self.current_statement.start_balance = \ @@ -179,20 +160,20 @@ class MT940(object): self.current_statement.id) def handle_tag_62F(self, cr, data): - '''get ending balance''' + """get ending balance""" self.current_statement.end_balance = \ (1 if data[0] == 'C' else -1) * str2float(data[10:]) def handle_tag_64(self, cr, data): - '''get current balance in currency''' + """get current balance in currency""" pass def handle_tag_65(self, cr, data): - '''get future balance in currency''' + """get future balance in currency""" pass def handle_tag_61(self, cr, data): - '''get transaction values''' + """get transaction values""" transaction = self.create_transaction(cr) self.current_statement.transactions.append(transaction) self.current_transaction = transaction @@ -202,8 +183,8 @@ class MT940(object): # ...and the rest already is highly bank dependent def handle_tag_86(self, cr, data): - '''details for previous transaction, here most differences between - banks occur''' + """details for previous transaction, here most differences between + banks occur""" pass @@ -220,12 +201,16 @@ def main(filename): parser = MT940() parser.parse(None, open(filename, 'r').read()) for statement in parser.statements: - print('''statement found for %(local_account)s at %(date)s - with %(local_currency)s%(start_balance)s to %(end_balance)s - ''' % statement.__dict__) + print( + "statement found for %(local_account)s at %(date)s" + " with %(local_currency)s%(start_balance)s to %(end_balance)s" % + statement.__dict__ + ) for transaction in statement.transactions: - print(''' - transaction on %(execution_date)s''' % transaction.__dict__) + print( + "transaction on %(execution_date)s" % transaction.__dict__ + ) + if __name__ == '__main__': import sys diff --git a/account_banking_nl_ing/__openerp__.py b/account_banking_nl_ing/__openerp__.py index 6148018fa..fe1ad9464 100644 --- a/account_banking_nl_ing/__openerp__.py +++ b/account_banking_nl_ing/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 Therp BV () @@ -22,12 +23,11 @@ # along with this program. If not, see . # ############################################################################## - { 'name': 'ING (NL) Bank Statements Import', - 'version': '0.1.140', + 'version': '7.0.0.1.141', 'license': 'AGPL-3', - 'author': ['Smile', 'Therp BV', 'EduSense BV'], + 'author': 'Smile,Therp BV,EduSense BV,Odoo Community Association (OCA)', 'website': 'https://launchpad.net/banking-addons', 'category': 'Banking addons', 'depends': ['account_banking'], diff --git a/account_banking_nl_ing_mt940/__init__.py b/account_banking_nl_ing_mt940/__init__.py index 3b6be506a..dc8f62794 100644 --- a/account_banking_nl_ing_mt940/__init__.py +++ b/account_banking_nl_ing_mt940/__init__.py @@ -1,21 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_banking_nl_ing_mt940 diff --git a/account_banking_nl_ing_mt940/__openerp__.py b/account_banking_nl_ing_mt940/__openerp__.py index a7187da4e..49a3396a7 100644 --- a/account_banking_nl_ing_mt940/__openerp__.py +++ b/account_banking_nl_ing_mt940/__openerp__.py @@ -1,27 +1,11 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "MT940 import for Dutch ING", - "version": "1.1", + "version": "7.0.1.1.1", "author": "Therp BV,Odoo Community Association (OCA)", + 'license': 'AGPL-3', "complexity": "normal", "description": """ This addon imports the structured MT940 format as offered by the Dutch ING @@ -31,18 +15,7 @@ bank. "depends": [ 'account_banking_mt940', ], - "data": [ - ], - "js": [ - ], - "css": [ - ], - "qweb": [ - ], "auto_install": False, "installable": True, "application": False, - "external_dependencies": { - 'python': [], - }, } diff --git a/account_banking_nl_ing_mt940/account_banking_nl_ing_mt940.py b/account_banking_nl_ing_mt940/account_banking_nl_ing_mt940.py index 32f560c77..97609086c 100644 --- a/account_banking_nl_ing_mt940/account_banking_nl_ing_mt940.py +++ b/account_banking_nl_ing_mt940/account_banking_nl_ing_mt940.py @@ -1,23 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2014-2017 Therp BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import re from openerp.tools.translate import _ from openerp.addons.account_banking.parsers.models import ( diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index eeaf62087..8456e8aba 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -26,7 +26,7 @@ { 'name': 'Account Banking - Payments Export Infrastructure', - 'version': '0.1.165', + 'version': '7.0.0.1.166', 'license': 'AGPL-3', 'author': "Banking addons community,Odoo Community Association (OCA)", 'website': 'https://launchpad.net/banking-addons', diff --git a/account_banking_payment_export/view/bank_payment_manual.xml b/account_banking_payment_export/view/bank_payment_manual.xml index e350c9b6f..18e73ccfe 100644 --- a/account_banking_payment_export/view/bank_payment_manual.xml +++ b/account_banking_payment_export/view/bank_payment_manual.xml @@ -8,8 +8,8 @@