def _format_iban(string):
'''
- This function removes all characters from given 'string' that isn't a alpha numeric and converts it to lower case.
+ This function removes all characters from given 'string' that isn't a alpha numeric and converts it to upper case.
'''
res = ""
for char in string:
if char.isalnum():
- res += char.lower()
+ res += char.upper()
return res
class res_partner_bank(osv.osv):
for bank_acc in self.browse(cr, uid, ids, context=context):
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
iban_country = self.browse(cr, uid, ids)[0].iban[:2]
if default_iban_check(iban_country):
iban_example = iban_country in _ref_iban and _ref_iban[iban_country] + ' \nWhere A = Account number, B = National bank code, S = Branch code, C = account No, N = branch No, K = National check digits....' or ''
- return _('The IBAN does not seems to be correct. You should have entered something like this %s'), (iban_example)
+ return _('The IBAN does not seem to be correct. You should have entered something like this %s'), (iban_example)
return _('The IBAN is invalid, It should begin with the country code'), ()
def name_get(self, cr, uid, ids, context=None):