From 4765a4e392fb1b89c2060732045bb003a2fc0ca9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Feb 2013 14:34:05 +0100 Subject: [PATCH] [FIX] statement can't be canceled --- account_statement_ext/statement.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py index 3881e482..f6e5b565 100644 --- a/account_statement_ext/statement.py +++ b/account_statement_ext/statement.py @@ -179,23 +179,6 @@ class AccountBankSatement(Model): ['journal_id', 'period_id']), ] - def button_cancel(self, cr, uid, ids, context=None): - """ - We cancel the related move, delete them and finally put the - statement in draft state. So no need to unreconcile all entries, - then unpost them, then finaly cancel the bank statement. - """ - for st in self.browse(cr, uid, ids, context=context): - if st.state == 'draft': - continue - ids = [] - for line in st.line_ids: - for move in line.move_ids: - if move.state != 'draft': - move.button_cancel(context=context) - return super(AccountBankSatement, self).button_cancel( - cr, uid, ids, context=context) - def _prepare_move(self, cr, uid, st_line, st_line_number, context=None): """Add the period_id from the statement line date to the move preparation. Originaly, it was taken from the statement period_id