[MERGE] base: raise an exception if the format of the bank account is wrong

bzr revid: stw@openerp.com-20120911144428-dok1potnoe5ks8g4
This commit is contained in:
Stephane Wirtel 2012-09-11 16:44:28 +02:00
commit 5d8f738b88
1 changed files with 2 additions and 3 deletions

View File

@ -199,9 +199,8 @@ class res_partner_bank(osv.osv):
if not val._data[val.id]['bank_name']:
val._data[val.id]['bank_name'] = _('BANK')
result = self._prepare_name_get(cr, uid, t, val, context=context)
except:
result += ' [Formatting Error]'
raise
except Exception:
raise osv.except_osv(_("Formating Error"), _("Invalid Bank Account Type Name format."))
res.append((val.id, result))
return res