Comment 1 for bug 381910

Revision history for this message
Grzegorz Grzelak (OpenGLOBE.pl) (grzegorz-og.pl) wrote :

I have different behaviour in 5.0.6 (also wrong).

I created 2 Products with cost 100EUR, first assigned to linear method asset (5 intervals -> 20%), second to progressive (30%).
And run "Compute Assets".

For linear method I got depreciation 20EUR but Residual 60 (should be 100-20=80).
For progressive method I got depreciation 30 but residual 40 (should be 100-30=70)

It looks that depreciation is counted twice for residual.
And for progressive account sides are wrong. Depreciation should Debit and Fixed assets should be Credit (is opposite). In linear is correct.

And finally I am not able to run "Compute Assets" any more. I tested few times creating fresh database. Every second time I got:
Environment Information :
System : Linux-2.6.28-15-generic-i686-with-Ubuntu-9.04-jaunty
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
Operating System Release : 2.6.28-15-generic
Operating System Version : #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009
Operating System Architecture : 32bit
Operating System Locale : pl_PL.UTF8
Python Version : 2.5.4
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 639, in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 619, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py", line 178, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py", line 74, in execute_cr
    action_res = action(self, cr, uid, data, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/account_asset.zip/account_asset/wizard/wizard_asset_compute.py", line 52, in _asset_compute
    ids_create += ass_obj._compute_entries(cr, uid, asset, data['form']['period_id'], context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/account_asset.zip/account_asset/account_asset.py", line 172, in _compute_entries
    period = self._compute_period(cr, uid, property, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/account_asset.zip/account_asset/account_asset.py", line 105, in _compute_period
    current_period = self.pool.get('account.period').browse(cr, uid, cpid, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 436, in browse
    return browse_record(cr, uid, select, self, cache, context=context, list_class=self._list_class, fields_process=fields_process)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 146, in __init__
    raise BrowseRecordError(_('Wrong ID for the browse record, got %r, expected an integer.') % (id,))
BrowseRecordError: Wrong ID for the browse record, got False, expected an integer.