← Back to team overview

openerp-expert-accounting team mailing list archive

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

 

Thanks Grzegorz, great work :)

> Farther development is of course welcome and needed.

We still haven't had time to do it (sorry). But, adapting it to the
Spanish accounting requirements, is on our medium-term "TO-DO list".

> Duplicating of asset works bad

That usually happens with complex objects that point (one2many) to other objects that don't have an existence dependency.
But it can be fixed by overriding the default copy method:

    def copy(self, cr, uid, id, default=None, context=None):
        old = self.browse(cr, uid, id)
        vals = { 'name': old.name,  ... }
        new_id = self.create(cr, uid, vals, context=context)
        return new_id

> I think modules should have not just field of author but some
> list of authors to expand it during development.

+1 
Being an open source project, we can expect the modules to receive contributions from several authors along the time.

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