"Document" installation delete all previous attachments...

Bug #445306 reported by Nicolas DS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
High
Harry (OpenERP)

Bug Description

Hi, I am using latest 5.0 (stable) version (branch)

Instead of storing attachment in DB, the "document" module store them on disk.
But when installing this module you will lose ALL previous attachments.

Indeed, this module replace "datas" binary field, by a function field. So all data are deleted from DB without warning.

This is a big issue with this module. The user must be warned before installing the module.

One simple solution: change the module description with a warning.

Related branches

Nicolas DS (zyphos)
description: updated
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello,

Please describe the problem in steps to reproduce.

Installing document modules removes ir.attachment entires?

No this is not the case at our end.

Kindly check and let us know.

Thank you.

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

OOPS, sorry for mis-posting.

This was a confirmed error.

Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
assignee: nobody → Harry (Open ERP) (hmo-tinyerp)
importance: Undecided → High
Changed in openobject-addons:
milestone: none → v5.2
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Do users really read that kind of warnings? Isn't there a way for document to serialize all attachments to disk before altering the DB field, to make the migration/installation transparent?

(though that begs the question of how to handle the uninstallation)

Revision history for this message
Nicolas DS (zyphos) wrote :

I was thinking the same thing. (Serialization) The best approach should be to re-inject all data from old definition of an object through the new definition of this object.

Revision history for this message
Richard (John) Nopkins@Servosoft (richard-nopkins) wrote :

any updates?

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Milestone 5.2 for the total solution to fix this bug.
Milestone 5.0.7 to add at least a warning into the description of the module.

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Harry, can you add a line into the description before releasing 5.0.7:
ATTENTION: When you install this module in a running company that have already PDF files stored into the database, you will lose them all. After installing this module PDF's are not longer stored into the database, but in the servers rootpad like /server/bin/filestore.

Then it can be removed when your total solution will be delivered and a convert of PDF from database to filestore is done.
Thanks in advance.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello, I temporary switch the issue to 5.0.7 as per Jan request until his warning is included (not a regression but easy thing to do and very mission critical). After that we will switch it back to 5.2 milestone for a longer term solution.

Changed in openobject-addons:
milestone: v5.2 → 5.0.7
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello, any reason why you don't add the proposed warning message in the module? Do you agree with that?

Revision history for this message
Harry (OpenERP) (hmo-tinyerp) wrote :

Sorry for late. I'm agree with put warning message in stable. and I have fixed it in stable. We will resolve that problem in 5.2.

Thanks

Changed in openobject-addons:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
milestone: 5.0.7 → v5.2
Revision history for this message
Harry (OpenERP) (hmo-tinyerp) wrote :

this problem is fixed in my branch :
lp:~hmo-tinyerp/openobject-addons/p_christeas_addons/

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 445306] Re: "Document" installation delete all previous attachments...

Hello Harry,

thank you for the warning message.

On Thu, Dec 17, 2009 at 12:42 PM, Harry (Open ERP) <email address hidden> wrote:

> this problem is fixed in my branch :
> lp:~hmo-tinyerp/openobject-addons/p_christeas_addons/
>
> --
> "Document" installation delete all previous attachments...
> https://bugs.launchpad.net/bugs/445306
> You received this bug notification because you are subscribed to
> OpenObject Addons.
>
> Status in OpenObject Addons Modules: Confirmed
>
> Bug description:
> Hi, I am using latest 5.0 (stable) version (branch)
>
> Instead of storing attachment in DB, the "document" module store them on
> disk.
> But when installing this module you will lose ALL previous attachments.
>
> Indeed, this module replace "datas" binary field, by a function field. So
> all data are deleted from DB without warning.
>
> This is a big issue with this module. The user must be warned before
> installing the module.
>
> One simple solution: change the module description with a warning.
>
>
>
>
>

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

It has been fixed in to trunk.
Kindly check it.
Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Released
Revision history for this message
Ferdinand (office-chricar) wrote :

the problem is back in 6.1

IMHO it is not sufficient to just put a warning.
stored pdf for invoices are accounting data which must never be lost.

BTW - IMHO the data are still stored in ir_attachment but the module "does not know" how to open these.

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.