[REF] account: removal of useless code catching/hiding exceptions. Not needed

bzr revid: qdp-launchpad@openerp.com-20130404155927-7eovla17dcowt02h
This commit is contained in:
Quentin (OpenERP) 2013-04-04 17:59:27 +02:00
commit ec06d3ed54
1 changed files with 0 additions and 12 deletions

View File

@ -370,18 +370,6 @@ class account_invoice(osv.osv):
context['view_id'] = view_id
return context
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
try:
return super(account_invoice, self).create(cr, uid, vals, context)
except Exception, e:
if '"journal_id" viol' in e.args[0]:
raise orm.except_orm(_('Configuration Error!'),
_('There is no Sale/Purchase Journal(s) defined.'))
else:
raise orm.except_orm(_('Unknown Error!'), str(e))
def invoice_print(self, cr, uid, ids, context=None):
'''
This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow