[Fix]:Bug 523428: iban account upper case

bzr revid: rhaopenerp-20101122134247-p99gx9a8fwj67ks4
This commit is contained in:
rha(OpenERP) 2010-11-22 19:12:47 +05:30
parent 57a9732d25
commit 562dcd893f
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ def _format_iban(string):
res = ""
for char in string:
if char.isalnum():
res += char.lower()
res += char.upper()
return res
class res_partner_bank(osv.osv):
@ -92,7 +92,7 @@ class res_partner_bank(osv.osv):
for bank_acc in self.browse(cr, uid, ids):
if not bank_acc.iban:
continue
iban = _format_iban(bank_acc.iban)
iban = _format_iban(bank_acc.iban).lower()
if iban[:2] in _iban_len and len(iban) != _iban_len[iban[:2]]:
return False
#the four first digits have to be shifted to the end