[IMP] account_asset: fixed depriciation board calculation problem
bzr revid: cha@tinyerp.com-20120824054747-vgfv4e3xv7h7ao0r
This commit is contained in:
@@ -141,7 +141,7 @@ class account_asset_asset(osv.osv):
|
||||
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)
|
||||
|
||||
|
||||
amount_to_depr = residual_amount = asset.value_residual
|
||||
if asset.prorata:
|
||||
depreciation_date = datetime.strptime(self._get_last_depreciation_date(cr, uid, [asset.id], context)[asset.id], '%Y-%m-%d')
|
||||
@@ -189,7 +189,7 @@ class account_asset_asset(osv.osv):
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
cr.execute("""SELECT
|
||||
l.asset_id as id, round(SUM(abs(l.debit-l.credit))) AS amount
|
||||
l.asset_id as id, SUM(abs(l.debit-l.credit)) AS amount
|
||||
FROM
|
||||
account_move_line l
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user