openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #14127
[Bug 1030795] [NEW] 6.1 stock_picking.action_invoice_create: calling by xmlrpc raises TypeError
Public bug reported:
Hello,
When the action_invoice_create method of stock.picking is called via
XMLRPC, an exception is reported, because that method returns a
dictionary with non-string keys:
*********** OpenERP Server ERROR ***********
dictionary key must be string
Traceback (most recent call last):
File "/home/afayolle/work/alpes_dev/openerp_buildout/src/server/openerp/wsgi/core.py", line 80, in xmlrpc_return
response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps
data = m.dumps(params)
File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 733, in dump_struct
raise TypeError, "dictionary key must be string"
TypeError: dictionary key must be string
********************************************
The action is performed correctly, though. And the web client probably
ignores the errors. But it is very disturbing when scripting OpenERP to
run tests.
I'm reporting this on openobject-addons stable because this is where I
observed the issue. I understand that changing this in stable is not
going to be possible, but I would appreciate if a fix could be made for
this in openobject server trunk.
A simple workaround could be handling TypeError in xmlrpc_return
(core.py) when calling xmlrpclib(dumps(...)) and issuing a warning in
the server log about this before returning a normal status.
Thanks for your time.
** Affects: openobject-addons
Importance: Undecided
Status: New
** Summary changed:
- 6.1 stock_picking.action_invoice_create: cannot be called by xmlrpc
+ 6.1 stock_picking.action_invoice_create: calling by xmlrpc raises TypeError
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1030795
Title:
6.1 stock_picking.action_invoice_create: calling by xmlrpc raises
TypeError
Status in OpenERP Addons (modules):
New
Bug description:
Hello,
When the action_invoice_create method of stock.picking is called via
XMLRPC, an exception is reported, because that method returns a
dictionary with non-string keys:
*********** OpenERP Server ERROR ***********
dictionary key must be string
Traceback (most recent call last):
File "/home/afayolle/work/alpes_dev/openerp_buildout/src/server/openerp/wsgi/core.py", line 80, in xmlrpc_return
response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps
data = m.dumps(params)
File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 733, in dump_struct
raise TypeError, "dictionary key must be string"
TypeError: dictionary key must be string
********************************************
The action is performed correctly, though. And the web client probably
ignores the errors. But it is very disturbing when scripting OpenERP
to run tests.
I'm reporting this on openobject-addons stable because this is where I
observed the issue. I understand that changing this in stable is not
going to be possible, but I would appreciate if a fix could be made
for this in openobject server trunk.
A simple workaround could be handling TypeError in xmlrpc_return
(core.py) when calling xmlrpclib(dumps(...)) and issuing a warning in
the server log about this before returning a normal status.
Thanks for your time.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1030795/+subscriptions
Follow ups
References