Better error message
bzr revid: ced-fe03323241e5001d6fcf866e0a0fa7a1a9e4f8f3
This commit is contained in:
parent
85f4ece183
commit
7e33235a8d
|
@ -671,7 +671,9 @@ class account_move(osv.osv):
|
|||
toremove = []
|
||||
for move in self.browse(cr, uid, ids, context):
|
||||
if move['state'] <> 'draft':
|
||||
raise osv.except_osv('Error', 'You must first cancel the invoice movement: %s !' % move['name'])
|
||||
raise osv.except_osv('UserError',
|
||||
'You can not delete posted movement: "%s"!' % \
|
||||
move['name'])
|
||||
line_ids = map(lambda x: x.id, move.line_id)
|
||||
context['journal_id'] = move.journal_id.id
|
||||
context['period_id'] = move.period_id.id
|
||||
|
|
Loading…
Reference in New Issue