[FIX] account: put amove into draft state by button_cancel() before unlink() because we can not delete any posted move
bzr revid: rha@tinyerp.com-20120702055845-60nprzm2lq7rv2hc
This commit is contained in:
parent
d7d33ef888
commit
64297873d4
|
@ -376,6 +376,7 @@ class account_bank_statement(osv.osv):
|
|||
ids = []
|
||||
for line in st.line_ids:
|
||||
ids += [x.id for x in line.move_ids]
|
||||
account_move_obj.button_cancel(cr, uid, ids, context=context)
|
||||
account_move_obj.unlink(cr, uid, ids, context)
|
||||
done.append(st.id)
|
||||
return self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
|
|
Loading…
Reference in New Issue