mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_banking_nl_girotol: use correct values to convert to/from SWIFT,
only convert string types
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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):
|
||||
'''
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
##############################################################################
|
||||
{
|
||||
'name': 'Account Banking',
|
||||
'version': '0.50',
|
||||
'version': '0.51',
|
||||
'license': 'GPL-3',
|
||||
'author': 'EduSense BV',
|
||||
'website': 'http://www.edusense.nl',
|
||||
|
||||
Reference in New Issue
Block a user