[document] OpenOffice files in DMS truncated to 0 bytes when directly edited

Bug #537281 reported by Olivier Dony (Odoo)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Won't Fix
Medium
Unassigned
Trunk
Fix Released
Medium
Unassigned

Bug Description

In latest stable there are cases where OpenOffice will somehow cause the file in the DMS to be truncated to 0 bytes.

How to reproduce:
 - have a database with document module installed
 - connect through FTP and push a test .odt file from OpenOffice (I used OOo 3.0)
 - the file is uploaded and file size is correct
 - using FTP integration in you Operating System, connect to the FTP directly from you file explorer (e.g. nautilus in Ubuntu)
 - now double-click on the file in the FTP directory directly to edit it
 - it opens in OOo correctly and you can edit it
 - try to modify and save the file directly in OOo => the save fails with an error message about access rights but at the same time the file is truncated to 0 bytes in the DMS
 - now if you open another FTP client on another machine you will see the file is 0 bytes now

Investigation:
Watching the server log it seems that OOo tries to test/use the write access using APPE instead of STOR, and perhaps there is something wrong in our support of APPE (we replace file instead of append?)
OOo also creates its lock files etc. but that seems to work fine I think, so it should not be related.

Changed in openobject-addons:
milestone: 5.0.8 → 5.0.9
Changed in openobject-addons:
milestone: 5.0.9 → 5.0.10
Revision history for this message
Julian Robbins (joolsr) wrote :

Yes, I noticed this too. It is quite a bad problem, as we're hoping to edit Open Office Documents that are stored and created as Quotes in the DMS

Revision history for this message
Julian Robbins (joolsr) wrote :

The lock files which are reqd, are ok, but do tend to look a bit odd on a MS file system, as files starting with a dot arent normally ignored as in Linux.

Is the main issue related to the OOo changes in file locking around version 3, and chaning back to its original behaviour at around version 3.10 OTOH

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Duplicate of itself.

Changed in openobject-addons:
milestone: 5.0.10 → 5.0.11
Revision history for this message
Julian Robbins (joolsr) wrote :

If I'm going to implement OpenERP in my company we are banking on using the DMS with OpenOffice documents. So far this bug was set to be fixed in 5.0.8, then postponed for 5.0.9, then 5.0.10, and now onto 5.0.11

What is holding this work up? This bug was on the list of important bugs to get fixed in 5.0.9 as fa as i remember, so what happened ?

description: updated
Changed in openobject-addons:
milestone: 5.0.11 → 5.0.12
Revision history for this message
Julian Robbins (joolsr) wrote :

Why does this keep getting put back ? Firstly 5.0.8, now promised for 5.0.12 Will it ever get fixed ?

Changed in openobject-addons:
assignee: Harry (Open ERP) (hmo-tinyerp) → nobody
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Panos,

Can you please mention where has this been fixed?

Thanks.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 537281] Re: [document] OpenOffice files in DMS truncated to 0 bytes when directly edited

On Thursday 09 December 2010, you wrote:
> Panos,
>
> Can you please mention where has this been fixed?
>
It is in v6. The whole API of the nodes has been refactored, now allowing
attachments to open in "append" mode.

We even have a test at document_ftp/test/document_ftp_test2.yml:58

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.