unable to call obj_list method

Bug #632195 reported by Shah Japan
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

see the traceback below

In [31]: import rpc

In [32]: rpc.initialize('localhost',8069,'http',{})

In [33]: rpc.session.login('trunk','admin','admin')
Out[33]: 1

In [34]: rpc.session.execute('object','obj_list')
---------------------------------------------------------------------------
TinyError Traceback (most recent call last)

/home/.../workspace/trunk/web/addons/openerp/utils/<ipython console> in <module>()

/home/.../workspace/trunk/web/addons/openerp/utils/rpc.pyc in execute(self, obj, method, *args)
    353 raise common.warning(_('Not logged...'), _('Authorization Error'))
    354
--> 355 return self.gateway.execute(obj, method, *args)
    356
    357 def execute_noauth(self, obj, method, *args):

/home/.../workspace/trunk/web/addons/openerp/utils/rpc.pyc in execute(self, obj, method, *args)
    151 @return: the result of the method
    152 """
--> 153 return self.__execute(obj, method, args)
    154
    155 def execute_noauth(self, obj, method, *args):

/home/.../workspace/trunk/web/addons/openerp/utils/rpc.pyc in __execute(self, obj, method, args, auth)
    137 raise common.error(_('Access Denied'), err.code)
    138 else:
--> 139 raise common.error(_('Application Error'), err.backtrace)
    140
    141 except Exception, e:

/home/.../workspace/trunk/web/addons/openerp/utils/common.pyc in error(title, msg, details)
     70
     71 def error(title, msg, details=None):
---> 72 raise TinyError(message=msg, title=title or _("Error"))
     73
     74 def warning(msg, title=None):

TinyError: Traceback (most recent call last):
  File "/home/.../workspace/trunk/server/bin/netsvc.py", line 435, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/.../workspace/trunk/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
TypeError: obj_list() takes exactly 1 argument (3 given)

Tags: obj-list rpc

Related branches

Shah Japan (jsh.axelor)
description: updated
Revision history for this message
xrg (xrg) wrote : Re: [Bug 632195] [NEW] unable to call obj_list method

On Tuesday 07 September 2010, you wrote:
> Public bug reported:
>
> see the traceback below
> In [31]: import rpc
> In [32]: rpc.initialize('localhost',8069,'http',{})
> In [33]: rpc.session.login('trunk','admin','admin')
> Out[33]: 1
> In [34]: rpc.session.execute('object','obj_list')

Yes, this method had been broken ever since the refactoring of RPC.
I had written a patch in my trunk-pg84 that fixes it, but had to get some
feedback before altering this functionality at trunk:

http://git.hellug.gr/?p=xrg/openobject-
server;a=commit;h=d4129a2f8ce3f5552f0539

Shah Japan (jsh.axelor)
Changed in openobject-server:
status: New → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello JSH,

As of version 6.0 the obj_list() method is deprecated and should not be called via RPC anymore.
If you need to get the list of models you should instead call execute(..., 'ir.model', 'read' ... ) via RPC.

The server now properly reports this error when you attempt to call it via RPC (as of revision 3078
 <email address hidden> )

Thanks for reporting!

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
milestone: none → 6.0-rc2
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.