[IMP] Fix the case of using draft state on move when cancelling a bank statement

(lp:c2c-financial-addons/6.1 rev 84)
This commit is contained in:
Joël Grand-Guillaume
2012-09-19 08:59:33 +02:00
parent 68aea29310
commit e52602aee9

View File

@@ -174,6 +174,7 @@ class AccountBankSatement(Model):
ids = []
for line in st.line_ids:
for move in line.move_ids:
if move.state <> 'draft':
move.button_cancel(context=context)
move.unlink(context=context)
done.append(st.id)