mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Italian IBAN format
This commit is contained in:
@@ -219,7 +219,7 @@ class IBAN(str):
|
||||
# Iceland uses an extra identification number, split in two on
|
||||
# display. Coded here as %P%V.
|
||||
'IS': BBANFormat('CCCCTTAAAAAAPPPPPPVVVV', '%C-%T-%A-%P-%V'),
|
||||
'IT': BBANFormat('WBBBBBCCCCCCAAAAAAAAAAAAV', '%W/%B/%C/%A%V'),
|
||||
'IT': BBANFormat('WBBBBBCCCCCAAAAAAAAAAAA', '%W/%B/%C/%A'),
|
||||
'LV': BBANFormat('BBBBAAAAAAAAAAAAA', '%I'),
|
||||
'LI': BBANFormat('CCCCCAAAAAAAAAAAA', '%C %A', nolz=True),
|
||||
'LT': BBANFormat('BBBBBAAAAAAAAAAA', '%I'),
|
||||
@@ -267,11 +267,12 @@ class IBAN(str):
|
||||
in 'C' implemented class, this can't be done in __init__.
|
||||
'''
|
||||
init = ''
|
||||
for item in arg.upper():
|
||||
if item.isalnum():
|
||||
init += item
|
||||
elif item not in ' \t.-':
|
||||
raise ValueError, 'Invalid chars found in IBAN number'
|
||||
if arg:
|
||||
for item in arg.upper():
|
||||
if item.isalnum():
|
||||
init += item
|
||||
elif item not in ' \t.-':
|
||||
raise ValueError, 'Invalid chars found in IBAN number'
|
||||
return str.__new__(cls, init)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user