[FIX] Account : Copying bank statement should not copy move lines
authorJay (Open ERP) <jvo@tinyerp.com>
Fri, 16 Apr 2010 09:34:02 +0000 (15:04 +0530)
committerJay (Open ERP) <jvo@tinyerp.com>
Fri, 16 Apr 2010 09:34:02 +0000 (15:04 +0530)
bzr revid: jvo@tinyerp.com-20100416093402-02cexv44hnljzm1l

addons/account/account_bank_statement.py

index e0a316a..789ae81 100644 (file)
@@ -353,6 +353,15 @@ class account_bank_statement(osv.osv):
         osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
         return True
     
+    def copy(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
+        if context is None:
+            context = {}    
+        default = default.copy()
+        default['move_line_ids'] = []
+        return super(account_bank_statement, self).copy(cr, uid, id, default, context)
+    
 account_bank_statement()