← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 695904] Re: Problem creating .odt report

 

Hi,

This is probably caused by the bugfix for bug 670778, and fixed recently in revision 3210 odo@xxxxxxxxxxx-20110104115419-fa4pv1dc63f83dxi.
Please reopen if after upgrading to the latest trunk server you still have the issue. 

Thanks!

Technical note:
In general binary fields can read/write values as base64-encoded data, to avoid issues when serializing these values via XML-RPC. We had to introduce a safety mechanism for those that do not (bug 670778), in which case the binary data is wrapped in a unicode string, which is serialized fine as XML-RPC. In this case special care is required when deserializing the binary value to restore its original byte values. In Python this can be done easily by using the pass-through encoding 'latin1', so you can simply use something like this to get the correct binary value out of the unicode one:
    binary_field_unicode_value.encode('latin1')

** Changed in: openobject-server
       Status: Confirmed => Fix Released

** Changed in: openobject-server
    Milestone: None => 6.0-rc2

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

Title:
  Problem creating .odt report

Status in OpenObject Server:
  Fix Released

Bug description:
  Hello,

In Low level object / action / report:
When I create report with "odt" Report Type the following error message generated:
"Bad magic number for central directory".

Trace back:
 ERROR:web-services:[01]: Exception: Bad magic number for central directory
 ERROR:web-services:[02]: Traceback (most recent call last):
 ERROR:web-services:[03]:   File "/home/tiny/workspace/trunk/server/bin/service/web_services.py", line 723, in go
 ERROR:web-services:[04]:     (result, format) = obj.create(cr, uid, ids, datas, context)
 ERROR:web-services:[05]:   File "/home/tiny/workspace/trunk/server/bin/report/report_sxw.py", line 423, in create
 ERROR:web-services:[06]:     fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
 ERROR:web-services:[07]:   File "/home/tiny/workspace/trunk/server/bin/report/report_sxw.py", line 429, in create_source_odt
 ERROR:web-services:[08]:     return self.create_single_odt(cr, uid, ids, data, report_xml, context or {})
 ERROR:web-services:[09]:   File "/home/tiny/workspace/trunk/server/bin/report/report_sxw.py", line 518, in create_single_odt
 ERROR:web-services:[10]:     sxw_z = zipfile.ZipFile(sxw_io, mode='r')
 ERROR:web-services:[11]:   File "/usr/lib/python2.6/zipfile.py", line 696, in __init__
 ERROR:web-services:[12]:     self._GetContents()
 ERROR:web-services:[13]:   File "/usr/lib/python2.6/zipfile.py", line 716, in _GetContents
 ERROR:web-services:[14]:     self._RealGetContents()

Thanks.





References