← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 747776] Re: [6.02] error opening crm categories

 

Sorry to bother you with this again

v6 and Python 2.6.5 (r265:79063, Oct 28 2010, 20:56:23) 
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]]
returns a dict
crm reads {'parent_id': False, 'name': u'Sales Department', 'id': 1}

v5 and Python 2.5.2 (r252:60911, Dec  1 2008, 18:10:01) 
[GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]]
returns a list with the dict
crm reads  [{'parent_id': False, 'name': u'Helpdesk and Support', 'id': 1}]

the attached patch solves the problem
revisions 6.0 series
server 3397
addons 4514

may be a strange behaviour of read method ?

** Patch added: "crm.py.20110408.patch"
   https://bugs.launchpad.net/openobject-addons/+bug/747776/+attachment/2001828/+files/crm.py.20110408.patch

** Changed in: openobject-addons
       Status: Invalid => New

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

Title:
  [6.02] error opening crm categories

Status in OpenERP Modules (addons):
  New

Bug description:
  tying to open crm categories
  (had to deaktivate name_get to proceed)

  Environment Information : 
  System : Linux-2.6.37.1-1.2-desktop-x86_64-with-SuSE-11.4-x86_64
  OS Name : posix
  LSB Version:	core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
  Distributor ID:	SUSE LINUX
  Description:	openSUSE 11.4 (x86_64)
  Release:	11.4
  Codename:	Celadon
  Operating System Release : 2.6.37.1-1.2-desktop
  Operating System Version : #1 SMP PREEMPT 2011-02-21 10:34:10 +0100
  Operating System Architecture : 64bit
  Operating System Locale : en_US.UTF8
  Python Version : 2.7.0
  OpenERP-Client Version : 6.0.1
  Last revision No. & ID :1805 nch@xxxxxxxxxxx-20110204062049-cinbbgay477geqem
  Traceback (most recent call last):
    File "/home/terp/OpenERP/trunk/openobject-server/6.0/bin/netsvc.py", line 489, in dispatch
      result = ExportService.getService(service_name).dispatch(method, auth, params)
    File "/home/terp/OpenERP/trunk/openobject-server/6.0/bin/service/web_services.py", line 599, in dispatch
      res = fn(db, uid, *params)
    File "/home/terp/OpenERP/trunk/openobject-server/6.0/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/terp/OpenERP/trunk/openobject-server/6.0/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/terp/OpenERP/trunk/openobject-server/6.0/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/terp/OpenERP/trunk/openobject-addons/6.0/crm/crm.py", line 668, in name_get
      name = record['name']
  TypeError: string indices must be integers, not str



References