[REM] Account: Cash statment remove button_Cancel method already available with bank...
authorMustufa Rangwala <mra@mra-laptop>
Wed, 29 Sep 2010 08:49:19 +0000 (14:19 +0530)
committerMustufa Rangwala <mra@mra-laptop>
Wed, 29 Sep 2010 08:49:19 +0000 (14:19 +0530)
bzr revid: mra@mra-laptop-20100929084919-jjhai4rqjuuldbx5

addons/account/account_bank_statement.py
addons/account/account_cash_statement.py

index 521c672..ba930c7 100644 (file)
@@ -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
index aebff21..ed987de 100644 (file)
@@ -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: