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,7 +174,8 @@ class AccountBankSatement(Model):
|
||||
ids = []
|
||||
for line in st.line_ids:
|
||||
for move in line.move_ids:
|
||||
move.button_cancel(context=context)
|
||||
if move.state <> 'draft':
|
||||
move.button_cancel(context=context)
|
||||
move.unlink(context=context)
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
|
||||
Reference in New Issue
Block a user