From 1ebc0a6c073e4fce6879b5cfe42a0489554f74d0 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 29 Sep 2010 14:19:19 +0530 Subject: [PATCH] [REM] Account: Cash statment remove button_Cancel method already available with bank statements bzr revid: mra@mra-laptop-20100929084919-jjhai4rqjuuldbx5 --- addons/account/account_bank_statement.py | 2 +- addons/account/account_cash_statement.py | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 521c672f410..ba930c7e01e 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -501,4 +501,4 @@ class account_bank_statement_line(osv.osv): account_bank_statement_line() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index aebff216c3b..ed987de7e37 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -247,7 +247,7 @@ class account_cash_statement(osv.osv): open_jrnl = self.search(cr, uid, sql) if open_jrnl: raise osv.except_osv('Error', _('You can not have two open register for the same journal')) - + if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash': open_close = self._get_cash_open_close_box_lines(cr, uid, context) vals.update({ @@ -370,16 +370,6 @@ class account_cash_statement(osv.osv): super(account_cash_statement, self).button_confirm_bank(cr, uid, ids, context=context) return self.write(cr, uid, ids, {'closing_date':time.strftime("%Y-%m-%d %H:%M:%S")}, context=context) - - def button_cancel(self, cr, uid, ids, context={}): - done = [] - for st in self.browse(cr, uid, ids, context): - ids = [] - for line in st.line_ids: - ids += [x.id for x in line.move_ids] - self.pool.get('account.move').unlink(cr, uid, ids, context) - done.append(st.id) - self.write(cr, uid, done, {'state':'draft'}, context=context) - return True - account_cash_statement() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: