[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:
Quentin (OpenERP) 2011-05-27 15:51:44 +02:00
commit 4bca760817
1 changed files with 8 additions and 0 deletions

View File

@ -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