[FIX] account_asset: Do not copy depreciation lines while copying asset.
bzr revid: uco@tinyerp.com-20110526110702-2i112dmip928vz0e
This commit is contained in:
parent
2bc8a08ed5
commit
6256ac7958
|
@ -188,6 +188,13 @@ class account_asset_asset(osv.osv):
|
|||
'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'account.asset.asset',context=context),
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
default['depreciation_line_ids'] = []
|
||||
return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _compute_period(self, cr, uid, property, context={}):
|
||||
if (len(property.entry_asset_ids or [])/2)>=property.method_delay:
|
||||
|
|
Loading…
Reference in New Issue