jasper repots crash when printing report on centos server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openobject-jasper-reports |
New
|
Undecided
|
Unassigned |
Bug Description
Jasper repots crash when printing report on centos server.
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/usr/lib/
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/usr/lib/
return r.execute()
File "/usr/lib/
generator.
File "/usr/lib/
self.allRecords += self.generateIds( record, relations, '', [ { 'root': record } ] )
File "/usr/lib/
unrepeated = set( [field.
AttributeError: 'str' object has no attribute 'partition'
Googling around shows, that it could be related to python version 2.4 (not supported method) what is used in Red Hat Linux and clones.
affects: | openobject-client-kde → openobject-jasper-reports |
Hi, I found this problem too in a centos server, as you say is related to python2.4 that haven't that method.
I made a homemade solution that consist in introduce the function partition in all the files that uses it.
The function is:
def partition(self, cad, sep):
num = cad.find(sep)
if num:
c1 = cad[0:num]
c2 = cad[num:num+1]
c3 = cad[num+1:len(cad)]
cadena = [c1, c2, c3]
return cadena
else:
return cad
Then you have to change all the calls to the function from field.partition ('/')[0] to self.partition( field,' /')[0]