openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #20655
[Bug 940263] Re: [6.1] report engine generates inconsistent odt/sxw files
Hi,
Fix release on stable server branch with revid:
xal@xxxxxxxxxxx-20130102152925-h81qv2fx300oakzv
Regards,
Xavier
** Changed in: openobject-server
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/940263
Title:
[6.1] report engine generates inconsistent odt/sxw files
Status in OpenERP Server:
Fix Released
Bug description:
Hi,
In report_sxw, you cannot call writestr to replace a file in an
archive. You must first remove the file from the archive otherwise you
end up with multiple times the same file in the archive and
unpredictable result when reading the file.
This can be performed by creating a new archive without the file you
want to replace, e.g. (not tested):
add={'content.xml':data, .... }
zin = zipfile.ZipFile ('archive.zip', 'r')
zout = zipfile.ZipFile ('archve_new.zip', 'w')
for item in zin.infolist():
buffer = zin.read(item.filename):
if (item.filename not in add.keys()):
zout.writestr(item, buffer)
for item,buffer in add.iteritem():
zout.writestr(item, buffer)
zin.close()
zout.close()
J-E
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/940263/+subscriptions
References