← Back to team overview

openerp-expert-accounting team mailing list archive

IBAN

 

IBAN 

Python IBAN validationg code 


I just want to emphasise that the IBAN number MUST be grouped into groups of 4 
digits - otherwise these are not usable / readable on computer screens and 
printouts as shown in the document.

only for EDI the blanks between groups should be removed

a on_change trigger or constraints should format the IBAN - see patch

-- 
Best Regards

ChriCar Beteiligungs- und Beratungs- GmbH
http://www.chricar.at/ChriCar/index.html
Dr. Ferdinand Gassauer
Official Tiny Partner
28,30c28
<     This function removes all characters from given 'string' that isn't a alpha numeric and converts it to upper case.
<     see also http://www.daniweb.com/forums/thread238464.html#
<     and groups by 4
---
>     This function removes all characters from given 'string' that isn't a alpha numeric and converts it to lower case.
35,42c33,34
<             res += char.upper()
<     iban = res 
<     res = ""
<     while len(iban) > 0 :
<         res = res + iban[0:4] + ' '
<         iban = iban[4:]
<     
<     return res.strip()
---
>             res += char.lower()
>     return res
66,67c58
<             # FIXME dirty hack - seems to work for us
<             iban =_format_iban(bank_acc.iban).lower().replace(" ","") 
---
>             iban =_format_iban(bank_acc.iban)