[FIX] Check if the iban key is present and has a value in the dictionary
lp bug: https://launchpad.net/bugs/323238 fixed bzr revid: stephane@tinyerp.com-20090203105003-4ix3ct06qj93xeux
This commit is contained in:
parent
2a18349ad6
commit
d75143727d
|
@ -38,13 +38,13 @@ class res_partner_bank(osv.osv):
|
|||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
#overwrite to format the iban number correctly
|
||||
if vals.has_key('iban'):
|
||||
if 'iban' in vals and vals['iban']:
|
||||
vals['iban'] = _format_iban(vals['iban'])
|
||||
return super(res_partner_bank, self).create(cr, uid, vals, context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}):
|
||||
#overwrite to format the iban number correctly
|
||||
if vals.has_key('iban'):
|
||||
if 'iban' in vals and vals['iban']:
|
||||
vals['iban'] = _format_iban(vals['iban'])
|
||||
return super(res_partner_bank, self).write(cr, uid, ids, vals, context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue