mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[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:
@@ -174,6 +174,7 @@ class AccountBankSatement(Model):
|
|||||||
ids = []
|
ids = []
|
||||||
for line in st.line_ids:
|
for line in st.line_ids:
|
||||||
for move in line.move_ids:
|
for move in line.move_ids:
|
||||||
|
if move.state <> 'draft':
|
||||||
move.button_cancel(context=context)
|
move.button_cancel(context=context)
|
||||||
move.unlink(context=context)
|
move.unlink(context=context)
|
||||||
done.append(st.id)
|
done.append(st.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user