[FIX] account_asset: copy should not keep history and move lines of previous asset
authorMartin Trigaux <mat@openerp.com>
Wed, 9 Apr 2014 10:06:58 +0000 (12:06 +0200)
committerMartin Trigaux <mat@openerp.com>
Wed, 9 Apr 2014 10:06:58 +0000 (12:06 +0200)
bzr revid: mat@openerp.com-20140409100658-1oj741aw5sne8dtr

addons/account_asset/account_asset.py

index 9200b81..806013e 100644 (file)
@@ -330,7 +330,7 @@ class account_asset_asset(osv.osv):
             default = {}
         if context is None:
             context = {}
-        default.update({'depreciation_line_ids': [], 'state': 'draft'})
+        default.update({'depreciation_line_ids': [], 'account_move_line_ids': [], 'history_ids': [], 'state': 'draft'})
         return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
 
     def _compute_entries(self, cr, uid, ids, period_id, context=None):