c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #07153
[Bug 632195] Re: unable to call obj_list method
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
odo@xxxxxxxxxxx-20101208131328-gycbi36423txdnc1 )
Thanks for reporting!
** Changed in: openobject-server
Importance: Undecided => Low
** Changed in: openobject-server
Status: Confirmed => Fix Released
** Changed in: openobject-server
Milestone: None => 6.0-rc2
** Changed in: openobject-server
Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/632195
Title:
unable to call obj_list method
Status in OpenObject Server:
Fix Released
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)