[Trunk/6.1] External file storage not working

Bug #1062258 reported by Stéphane Bidoul (Acsone)
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Medium
OpenERP R&D Addons Team 1
OpenERP Community Backports (Addons)
Fix Released
Undecided
Unassigned
6.1
Fix Released
Undecided
Unassigned

Bug Description

Hello,

In the document module the "external file storage" does not store documents at the right place.

Applicable to 6.1 and probably trunk, as the code did not change.

How to reproduce:
- install the document and project modules
- in Knowldege > Configuration, create a new Storage Media of type External File Storage named External File Storage
- in Knowldege > Configuration, remove all directories except the root (Document)
- change the storage of the Document Directory to External File Storage
- create a new Directory named Projects of type Folder per Resource and set Project as Resource
- create 2 projects named Project1 and Project2
- attach a pdf file to Project1
- attache the same pdf file with the same name to Project2
- browse over FTP: files are visible in folders Projects/Project1 and Projects/Project2 -> ok
- browse the file system: only one PDF can be found at the root of the file store -> strange
- in Project1, remove attachment
- in Project2, try to open the attachment -> system error

-sbi

Related branches

summary: - external file storage not working
+ [Trunk/6.1] External file storage not working
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :
Revision history for this message
Arnaud Pineux (OpenERP) (api-openerp) wrote :

Hello,

Here you can find a fix for that bug. https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1062258-api
(See Document_storage -> unlink)

Good luck,

Arnaud Pineux (API)

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hello,

I've not tested yet, but I've had a quick look at the patch. If I understand well, it's a kind of reference counter on files?

But what if two attachements on different objects have the same name but a different content. Will that work?

Regards,

-sbi

Changed in openobject-addons:
status: Fix Committed → New
Changed in ocb-addons:
status: New → Fix Committed
Changed in ocb-addons:
status: Fix Committed → Fix Released
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :
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.