[FIX] account_banking_nl_girotol: use correct values to convert to/from SWIFT,

only convert string types
This commit is contained in:
Pieter J. Kersten
2011-03-08 14:04:15 +01:00
parent 0263068e2f
commit 3254468dc0
6 changed files with 18 additions and 8 deletions

View File

@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking',
'version': '0.1.50',
'version': '0.1.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',

View File

@@ -26,7 +26,7 @@
##############################################################################
{
'name': 'Account Banking PATU module',
'version': '0.50',
'version': '0.51',
'license': 'GPL-3',
'author': 'Sami Haahtinen',
'website': 'http://ressukka.net',

View File

@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking NL ClieOp',
'version': '0.50',
'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',

View File

@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking - Girotel',
'version': '0.50',
'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',

View File

@@ -60,17 +60,27 @@ class transaction_message(object):
'remote_account', 'remote_owner', 'u2', 'transferred_amount',
'direction', 'u3', 'message', 'remote_currency',
]
# Attributes with possible non-ASCII string content
strattrs = [
'remote_owner', 'message'
]
ids = {}
def __setattribute__(self, attr, value):
if attr != 'attrnames' and attr in self.attrnames:
'''
Convert values for string content to SWIFT-allowable content
'''
if attr != 'attrnames' and attr in self.strattrs:
value = to_swift(value)
super(transaction_message, self).__setattribute__(attr, val)
super(transaction_message, self).__setattribute__(attr, value)
def __getattribute__(self, attr):
'''
Convert values from string content to SWIFT-allowable content
'''
retval = super(transaction_message, self).__getattribute__(attr)
return attr != 'attrnames' and attr in self.attrnames and to_swift(retval) or retval
return attr != 'attrnames' and attr in self.strattrs and to_swift(retval) or retval
def genid(self):
'''

View File

@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking',
'version': '0.50',
'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',