← Back to team overview

openerp-expert-accounting team mailing list archive

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

 

Nestor, if that is a question about the OpenERP API or features, you should post it here: https://answers.launchpad.net/openobject-addons
If it is a general question "how do I do...", I suggest you to go to the forum: http://openobject.com/forum/
Or, if you want to make the question in Spanish, go to the Spanish sub-forum of the official forum: http://openobject.com/forum/espanol-forum-f21.html 
or go to this unofficial Spanish forum: http://www.openerpsite.com/foro-openerp/

Either case, don't post questions unrelated to the bug here, thanks :)

---

Nestor, si esa es una pregunta acerca de la API de OpenERP o su funcionalidad, deberías escribirla aquí: https://answers.launchpad.net/openobject-addons
Si es una pregunta general "cómo hago para...", te sugiero que vayas al foro oficial: http://openobject.com/forum/
O, si quieres hacer la pregunta en español, vete al sub-foro español del foro oficial: http://openobject.com/forum/espanol-forum-f21.html 
o vete a este foro español no-oficial: http://www.openerpsite.com/foro-openerp/

En cualquier caso, no escribas preguntas no relacionadas con el bug
aquí, gracias :)

** Changed in: openobject-addons
       Status: Invalid => Fix Released

-- 
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: Fix Released

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