[IMP] Replace except_orm with Warning

This commit is contained in:
Adrien Peiffer
2014-11-19 09:25:36 +01:00
parent 727702d6d5
commit 51e4a8a6e2
3 changed files with 10 additions and 13 deletions

View File

@@ -45,8 +45,7 @@ class AccountMoveLine(models.Model):
return True
err_msg = (_('Invoice name (id): %s (%s)') %
(line.invoice.name, line.invoice.id))
raise exceptions.except_orm(
_('Error'),
raise exceptions.Warning(
_('You cannot do this on an entry generated by an invoice.'
'You must '
'change the related invoice directly.\n%s.') % err_msg)
@@ -60,8 +59,7 @@ class AccountMoveLine(models.Model):
return True
err_msg = (_('Bank statement name (id): %s (%s)') %
(line.statement_id.name, line.statement_id.id))
raise exceptions.except_orm(
_('Error'),
raise exceptions.Warning(
_('You cannot do this on an entry generated by a bank'
' statement. '
'You must change the related bank statement'