[MERGE] imp and merged the branch with overriding of copy() for account.asset.asset
bzr revid: qdp-launchpad@openerp.com-20110527135144-we36cphpske2qngm
This commit is contained in:
commit
4bca760817
|
@ -216,6 +216,14 @@ class account_asset_asset(osv.osv):
|
|||
}
|
||||
return res
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
default.update({'depreciation_line_ids': [], 'state': 'draft'})
|
||||
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:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue