Update outgoing_transaction.py
This commit is contained in:
parent
2177d76b23
commit
a73ff3e40d
|
|
@ -96,7 +96,7 @@ class OutgoingTransaction(models.Model):
|
|||
#
|
||||
def unlink(self):
|
||||
for record in self:
|
||||
if record.state == 'send':
|
||||
if record.state != 'draft':
|
||||
raise ValidationError(_('Cannot delete a sent transaction!'))
|
||||
return super(InternalTransaction, self).unlink()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue