mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] Replace except_orm with Warning
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user