[IMP] account_asset: Small changes
bzr revid: pso@tinyerp.com-20110512101208-x81zewy4h71j3aok
This commit is contained in:
parent
99afaa1db9
commit
f51b4b8a0f
|
@ -33,7 +33,7 @@ class account_asset_category(osv.osv):
|
|||
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'), #FIXME:add in the form view with group = analytic
|
||||
'account_asset_id': fields.many2one('account.account', 'Asset Account', required=True),
|
||||
'account_depreciation_id': fields.many2one('account.account', 'Depreciation Account', required=True),
|
||||
'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account',),#FIXME: required=True + add in the form view
|
||||
'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', required=True),#FIXME: required=True + add in the form view
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class account_asset_asset(osv.osv):
|
|||
def compute_depreciation_board(self, cr, uid,ids, context=None):
|
||||
depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
|
||||
for asset in self.browse(cr, uid, ids, context=context):
|
||||
old_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_line_id', '=', False)])
|
||||
old_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_id', '=', False)])
|
||||
if old_depreciation_line_ids:
|
||||
depreciation_lin_obj.unlink(cr, uid, old_depreciation_line_ids, context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue