Attached files are all saved in the same directory

Asked by Luciano Schirmer (IG-Tech)

I have installed the Knowledge module and configured a directory by resource, mapping to the res.partner object.
I can access each partner folder through ftp , I can send files to this folder and then I can see those files in OpenERP Web Client.
I can also see those folder physically in disk navigating the filestore directory.
But if I attach a file using the Web Client, they are physically saved allways in the same place (filestore/[company name]/Documents) and not in the partner directory.
Well, the BIG problem is that if I attach another file via Web Client to another partner, but with the same filename as the first (e.g. readme.txt), it overwrites the first one and keeps referencing the same file in both partners.
Is it possible to configure the directories to attach files physically in the partner directory or I showld not attach files through the Web Client, but only by the FTP interface?

Question information

Revision history for this message
Ferdinand (office-chricar) said :
#1

IMHO this is a grave BUG !!!

Revision history for this message
Luciano Schirmer (IG-Tech) (luciano-igtech) said :
#2

I agree, The document module is great, but since files may be so easily overwriten by the Attach action button, how can one trust to store important documents?

Revision history for this message
Ferdinand (office-chricar) said :
#3

please file a bug

Revision history for this message
xrg (xrg) said :
#4

On Monday 24 October 2011, you wrote:
> New question #176052 on OpenERP Server:
> https://answers.launchpad.net/openobject-server/+question/176052
>
> I have installed the Knowledge module and configured a directory by
> resource, mapping to the res.partner object. I can access each partner
> folder through ftp , I can send files to this folder and then I can see
> those files in OpenERP Web Client. I can also see those folder physically
> in disk navigating the filestore directory. ....

Are you using 6.0 or 6.1 server? Which web-client?

Did you select "filestore" as the storage backend, or "realstore"?

Revision history for this message
Luciano Schirmer (IG-Tech) (luciano-igtech) said :
#5

I'm using 6.0 server (6.0.3) and 6.0 web-client.
I chose to save the files in external filestore.

Revision history for this message
xrg (xrg) said :
#6

On Wednesday 26 October 2011, you wrote:
> Question #176052 on OpenERP Server changed:
> https://answers.launchpad.net/openobject-server/+question/176052
>
> Status: Answered => Open
>
> Luciano Schirmer (IG-Tech) is still having a problem:
> I'm using 6.0 server (6.0.3) and 6.0 web-client.
> I chose to save the files in external filestore.

OK, let me explain:
the "external filestore" (aka. 'realstore', internally) is the 3rd storage
engine, the last to be introduced. In 6.0 and 6.1 versions, that engine is in
"alpha" stage. It was only in the 'trunk-xrg' branch that the realstore engine
got the necessary development to reach the capabilities we expect. These
patches, although submitted, were never accepted for either 6.0 or 6.1.

Warning: 6.0.3 suffers a serious regression over 6.0.2 with respect to document
handling. Please revert to 6.0.2's version of the 'document' module.

However, I believe the bug you are referring is a different one: when you save
an attachment, that must be filed in one of the folders. If you attach to some
model (eg. to a partner), the engine must select the partner's folder to put
it in (and hence store it physically in the /Documents/partners/Partner's
name/ directory). Otherwise, it would falsely go to the generic "Documents/"
folder and overwrite other files.
It is a matter of setup to get that right. These "resource directories" like
the one for partners must have the "Find all resources" turned OFF, so that
they become the parents of the attachment you are trying to save through the
web-client. Unfortunately, that is not the default setting.

Revision history for this message
Luciano Schirmer (IG-Tech) (luciano-igtech) said :
#7

So, what is the solution for a running company like mine, using OpenERP in production?

1) Patch the document 'module' of my 6.0.3? In this case, where do I find a patch with a functional 'realstore' engine?

2) Revert to the 6.0.2 version of the 'document' module? How can I do this? In this case, can I use the 'realstore' engine?

3) Wait for the next stable version to be released? In this case, I'll choose not to use the 'document' module at all for now and store all the documents in standard folders in the operating system.

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.