← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 865263] Re: 'int' object is unsubscriptable in Compute Asset

 

Hello Ivan,

I have checked your issue with account_asset module of latest trunk
which is currently available in official

addons so you can try with this module instead of
"account_fixed_assets". I have attached video for your more

reference would you please check it.

Our R&D Teams are focused on the latest OpenERP version, and this issue
does not affect it.

Our policy is to keep the changes applied on stable branches to a
minimum, in order to limit the regression risks

for customers that are in production. This means that bugs reported on
Launchpad are fixed in the trunk branch

only by default, even if they were reported against other stable
versions.

Thank you for your understanding!

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/865263

Title:
  'int' object is unsubscriptable in Compute Asset

Status in OpenERP Addons (modules):
  Won't Fix

Bug description:
  This is pertaining to revno 4633.

  When the Compute Asset wizard is executed (Accounting >> Periodical
  Processing >> Asset Calculation >> Compute Asset), it produces 'int'
  object is unsubscriptable error.  Below is the detailed stack trace.

  The source of the problem is line 69 of wizard/account_fixed_assets_compute.py, which is:
       period = obj_asset._check_date(cr, uid, data['period_id'], data['date'], context)
  It passes the data['period_id'] as an integer (id) whereas the _check_date method is expecting a list.

  Attached is the proposed patch for this bug.

  The following is the stack trace:
    File "../openobject-server/bin/netsvc.py", line 489, in dispatch
      result = ExportService.getService(service_name).dispatch(method, auth, params)
    File "../openobject-server/bin/service/web_services.py", line 599, in dispatch
      res = fn(db, uid, *params)
    File "../openobject-server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "../openobject-server/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "../openobject-server/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "../openobject-addons/account_fixed_assets/wizard/account_fixed_assets_compute.py", line 69, in compute_assets
      period = obj_asset._check_date(cr, uid, data['period_id'], data['date'], context)
    File "../openobject-addons/account_fixed_assets/account_asset.py", line 806, in _check_date
      period = period_obj.browse(cr, uid, period_id[0], context=context)
  TypeError: 'int' object is unsubscriptable

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/865263/+subscriptions


References