← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 766029] Re: get_xml_id method crashes when called from xml_rpc

 

Ok after further testing, it seems it breaks in the object when I browse
object...

I knew I was a bit too optimistic about this one ...

Environment Information : 
System : Linux-2.6.35-28-generic-pae-i686-with-Ubuntu-10.10-maverick
OS Name : posix
Distributor ID:	Ubuntu
Description:	Ubuntu 10.10
Release:	10.10
Codename:	maverick
Operating System Release : 2.6.35-28-generic-pae
Operating System Version : #50-Ubuntu SMP Fri Mar 18 20:43:15 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.6
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/addons/base_calendar/base_calendar.py", line 1838, in read
    context=context, load=load)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/osv/orm.py", line 2921, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/xxxx/xxxx/openerp/openerp-server-6.0.1/bin/osv/orm.py", line 3044, in _read_flat
    record[f] = res2[str(record['id'])]
KeyError: '57'

-- 
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/766029

Title:
  get_xml_id method crashes when called from xml_rpc

Status in OpenERP Server:
  New

Bug description:
  Env info:
  Ubuntu 10.10 
  Python 2.6
  Latest 6.0 (stable branch)

  When i try to call get_xml_id method through xml_rpc call it crashes
  because of a mismatch in dict key type.

  It either crashes directly in the orm.py file because the key isn't
  found (its created in one dict using str and in the other using int);

  Or this is the python SocketServer class that complains because according to this class (at least in my env):
  Fault: <Fault 1: "<type 'exceptions.TypeError'>:dictionary key must be string">

  So I edited the orm.py file to always string cast the key in that
  dict.

  I don't know if it has other effects but so far it's working on my
  side.

  Patch attached


References