← Back to team overview

openerp-expert-accounting team mailing list archive

[Bug 381910] Re: account_asset: incorrect calculation of asset depreciation amount

 

Good job Grzegorz; I'll try to give it a look tomorrow :)

-- 
account_asset: incorrect calculation of asset depreciation amount
https://bugs.launchpad.net/bugs/381910
You received this bug notification because you are a member of OpenERP
Accounting Experts, which is a direct subscriber.

Status in OpenObject Addons Modules: In Progress

Bug description:
The function Financial Management/Periodical Processing/Compute assets calculate asset depreciation amount incorrectly: instead of subtracting already-depreciated amounts before calculating amount for 2nd, 3rd etc months, the algorithm adds already-depreciated amounts to asset cost.

For example,
 Asset 1 costs $1000
 Depreciation method is progressive - 15% per period
For first period the algorithm create an account move in $150.
For second period the algorithm creates a move in $172.5 (10% from $1000 + $150)

After short investigation I've found a bug in the file account_asset.py in line 118:

is
114        for move in property.asset_id.entry_ids:
115            total += move.debit-move.credit
116        for move in property.entry_asset_ids:
117            if move.account_id == property.account_asset_ids:
118                total += move.debit-move.credit

should be
114        for move in property.asset_id.entry_ids:
115            total += move.debit-move.credit
116        for move in property.entry_asset_ids:
117            if move.account_id == property.account_asset_ids:
118                total -= move.debit-move.credit

Regards,
Michael





Follow ups