diff --git a/account_banking_fi_patu/patu.py b/account_banking_fi_patu/patu.py index dadf2c2eb..ea4279d1f 100644 --- a/account_banking_fi_patu/patu.py +++ b/account_banking_fi_patu/patu.py @@ -20,21 +20,20 @@ # ############################################################################## -''' +""" This parser implements the PATU format support. PATU format is a generic format used by finnish banks. -''' -from account_banking.parsers import models -from tools.translate import _ -from account_banking_fi_patu.parser import PatuParser +""" +from openerp.addons.account_banking.parsers import models +from openerp.tools.translate import _ +from openerp.addons.account_banking_fi_patu.parser import PatuParser -__all__ = ['parser'] +__all__ = ['Parser'] -class transaction(models.mem_bank_transaction): - ''' - Implementation of transaction communication class for account_banking. - ''' +class Transaction(models.mem_bank_transaction): + """Implementation of transaction communication class for account_banking. + """ mapping = { "remote_account": "recipientaccount", "remote_currency": "currency", @@ -48,10 +47,8 @@ class transaction(models.mem_bank_transaction): } def __init__(self, record, *args, **kwargs): - ''' - Initialize own dict with read values. - ''' - super(transaction, self).__init__(*args, **kwargs) + """Initialize own dict with read values.""" + super(Transaction, self).__init__(*args, **kwargs) for key in self.mapping: try: setattr(self, key, record[self.mapping[key]]) @@ -59,34 +56,30 @@ class transaction(models.mem_bank_transaction): pass def is_valid(self): - ''' - Override validity checks. + """Override validity checks. There are certain situations for PATU which can be validated as invalid, but are normal. If eventcode is 730, the transaction was initiated by the bank and doesn't have a destination account. - ''' + """ if self.eventcode in ["720", "710"]: # Withdrawal from and deposit to the account return (self.execution_date and self.transferred_amount and True) \ or False - if self.eventcode and self.eventcode == "730": # The transaction is bank initiated, no remote account is present return (self.execution_date and self.transferred_amount and True) \ or False - - return super(transaction, self).is_valid() + return super(Transaction, self).is_valid() class statement(models.mem_bank_statement): - ''' - Implementation of bank_statement communication class of account_banking - ''' + """Implementation of bank_statement communication class of account_banking + """ def __init__(self, record, *args, **kwargs): - ''' + """ Set decent start values based on first transaction read - ''' + """ super(statement, self).__init__(*args, **kwargs) self.id = record["statementnr"] self.local_account = self.convert_bank_account(record["accountnr"]) @@ -101,9 +94,7 @@ class statement(models.mem_bank_statement): return "%s-%s" % (bank, account) def import_transaction(self, record): - ''' - Import a transaction to the statement - ''' + """Import a transaction to the statement""" if record["recordid"] == "40": self.end_balance = record["balance"] elif record["recordid"] == "10" or record["recordid"] == "80": @@ -111,10 +102,10 @@ class statement(models.mem_bank_statement): # now, ignore the parent entry if record["receiptcode"] == "E": return - self.transactions.append(transaction(record)) + self.transactions.append(Transaction(record)) -class parser(models.parser): +class Parser(models.parser): code = 'FIPATU' name = _('PATU statement sheet') doc = _('''\ @@ -139,5 +130,3 @@ will parse all statements in a file and import them to OpenERP stmnt.import_transaction(record) result.append(stmnt) return result - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bank_statement_instant_voucher/__init__.py b/bank_statement_instant_voucher/__init__.py index 16e8b082f..f3fc39f79 100644 --- a/bank_statement_instant_voucher/__init__.py +++ b/bank_statement_instant_voucher/__init__.py @@ -1 +1,2 @@ -import model +# -*- coding: utf-8 -*- +from . import model diff --git a/bank_statement_instant_voucher/__openerp__.py b/bank_statement_instant_voucher/__openerp__.py index 5a811d541..15e7f22dd 100644 --- a/bank_statement_instant_voucher/__openerp__.py +++ b/bank_statement_instant_voucher/__openerp__.py @@ -46,11 +46,12 @@ supported. """, 'website': 'http://therp.nl', 'images': [], - 'depends': ['account_voucher'], + 'depends': [ + 'account_voucher', + ], 'data': [ 'view/account_voucher_instant.xml', 'view/account_bank_statement_line.xml', ], "license": 'AGPL-3', } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bank_statement_instant_voucher/i18n/bank_statement_instant_voucher.pot b/bank_statement_instant_voucher/i18n/bank_statement_instant_voucher.pot new file mode 100644 index 000000000..be3c77290 --- /dev/null +++ b/bank_statement_instant_voucher/i18n/bank_statement_instant_voucher.pot @@ -0,0 +1,178 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * bank_statement_instant_voucher +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-10 09:46+0000\n" +"PO-Revision-Date: 2014-09-10 09:46+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,balance:0 +msgid "Balance" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:_description:0 +#: model:ir.model,name:bank_statement_instant_voucher.model_account_bank_statement_line +#, python-format +msgid "Bank Statement Line" +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,statement_line_id:0 +msgid "Bank statement line" +msgstr "" + +#. module: bank_statement_instant_voucher +#: view:account.voucher.instant:0 +msgid "Cancel" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:167 +#, python-format +msgid "Cannot determine statement line" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:258 +#, python-format +msgid "Cannot match a confirmed statement line" +msgstr "" + +#. module: bank_statement_instant_voucher +#: view:account.voucher.instant:0 +msgid "Confirm" +msgstr "" + +#. module: bank_statement_instant_voucher +#: view:account.bank.statement:0 +#: view:account.voucher.instant:0 +#: model:ir.actions.act_window,name:bank_statement_instant_voucher.act_instant_voucher +msgid "Create matching voucher" +msgstr "" + +#. module: bank_statement_instant_voucher +#: view:account.voucher.instant:0 +msgid "Create voucher" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:225 +#, python-format +msgid "Currency on the bank statement line needs to be the same as on the voucher. Currency conversion is not yet supported." +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:79 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:166 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:224 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:234 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:242 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:247 +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:257 +#, python-format +msgid "Error" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:_description:0 +#: model:ir.model,name:bank_statement_instant_voucher.model_account_voucher_instant +#, python-format +msgid "Instant Voucher" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:80 +#, python-format +msgid "No %s journal defined" +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: bank_statement_instant_voucher +#: selection:account.voucher.instant,type:0 +msgid "Purchase" +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,ref:0 +msgid "Reference" +msgstr "" + +#. module: bank_statement_instant_voucher +#: selection:account.voucher.instant,type:0 +msgid "Sale" +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,state:0 +msgid "State" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:248 +#, python-format +msgid "The amount on the bank statement line needs to be the same as on the voucher. Write-off is not yet supported." +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:235 +#, python-format +msgid "The voucher could not be posted." +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:243 +#, python-format +msgid "The voucher's move line could not be posted." +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,voucher_id:0 +msgid "Voucher" +msgstr "" + +#. module: bank_statement_instant_voucher +#: code:addons/bank_statement_instant_voucher/model/account_voucher_instant.py:95 +#, python-format +msgid "Voucher for statement line %s.%s" +msgstr "" + +#. module: bank_statement_instant_voucher +#: field:account.voucher.instant,type:0 +msgid "Voucher type" +msgstr "" + +#. module: bank_statement_instant_voucher +#: selection:account.voucher.instant,state:0 +msgid "confirm" +msgstr "" + +#. module: bank_statement_instant_voucher +#: selection:account.voucher.instant,state:0 +msgid "init" +msgstr "" + +#. module: bank_statement_instant_voucher +#: view:account.voucher.instant:0 +msgid "or" +msgstr "" + +#. module: bank_statement_instant_voucher +#: selection:account.voucher.instant,state:0 +msgid "ready" +msgstr "" + diff --git a/bank_statement_instant_voucher/model/__init__.py b/bank_statement_instant_voucher/model/__init__.py index bb3faa358..7ace57607 100644 --- a/bank_statement_instant_voucher/model/__init__.py +++ b/bank_statement_instant_voucher/model/__init__.py @@ -1,2 +1,3 @@ -import account_voucher_instant -import account_bank_statement_line +# -*- encoding: utf-8 -*- +from . import account_voucher_instant +from . import account_bank_statement_line diff --git a/bank_statement_instant_voucher/view/account_bank_statement_line.xml b/bank_statement_instant_voucher/view/account_bank_statement_line.xml index 15660e9aa..4ca88a829 100644 --- a/bank_statement_instant_voucher/view/account_bank_statement_line.xml +++ b/bank_statement_instant_voucher/view/account_bank_statement_line.xml @@ -3,11 +3,11 @@ Add instant voucher button to bank statement line on statement form - + account.bank.statement -