This question has been flagged

Hi,

We are not able to get the filestore functionality to work or gain access straight to the filestore directory using ftp. Also the filestore directories to not show up under Knowledge > Configuration > Document Management > Directories.

We are using v7 nightly build 22.07.2013 on Ubuntu 13.04 with PostgreSQL 9.2.4. We want to migrate to filestore for storing our attachments.

We have followed the various threads in the forum how to do this, although there was no one thread that explained exactly the process how to do this without something being open to interpretation or requiring other knowledge.

We created the directory /opt/openerp/filestore/test (test is the name of our database) Owner and group of filestore and test are openerp:openerp with octal permissions set at 775

We added under Settings > Technical > Parameters > System Parameters the Key: ir_attachment.location and gave it a Value of file:///opt/openerp/filestore/test (it was not clear if this was exactly the correct way to define the Value or why it should be this way)

In addition we added to the /etc/openerp-server.conf file the following lines for ftp (we were not sure if this was really necessary): ftp_server_host = localhost , ftp_server_port = 8021

vsftpd was setup for port 8021 and works.

We then restarted the machine.

ISSUES: Firstly,

Under Knowledge > Documents > Shared Repository (FTP) we get an ftp:// link to admin@192.168.2.173:8021/test. <clicking> on Browse does not help as: a) the test directory is not under home in Ubuntu but under /opt/openerp/filestore/test b) using OpenERP credentials the FTP browser does not work, we have to enter a user/password of Ubuntu then it works.

Is there a way around a) so that the FTP browser OpenERP Link goes straight to the correct directory in filestore? Surely for b) it cannot be that OpenERP requires the same username also as a Ubuntu account aswell as an OpenERP user??

Secondly,

Under Knowledge > Configuration > Document Management > Directories , it is not possible to see our filestore or any of its subdirectories. It is like we never set the ir_attachment.location parameter.

We must be missing something basic here.

We presume that once the filestore becomes the default location that absolutely every new document will be saved in the filestore even for files newly stored in the existing directories that up to now stored the files in the database - is that the case?

Any help or tips of what we are forgetting would be much appreciated, thanks.

Avatar
Discard
Best Answer

Parameter: ir_attachment.location

Value: file:///filestore

Folder: opt/openerp/server/openerp/filestore

Your DB folder "test" are created by the System.

Avatar
Discard
Author

Thanks for the feedback. We corrected the Value and created the folder. The machine was restarted.

The folder test was not automatically created and when saving an attachments no option appears showing filestore.

Under Knowledge > Configuration > Directories , neither the directory 'filestore' or 'test' appears. Under Ubuntu we can see that nothing has been added to filestore directory.

It is really not clear why this is not working - any ideas would be welcome.

You have set the access rights for "filestore" to 777?

Any other update about this question? i'm still wondering where the file are stored ;0)

Best Answer

I think you had seen https://accounts.openerp.com/forum/Help-1/question/529

But there is an missing information : you must put your folder (containing files) in server/openerp/ folder (inside the source code server folder)

you can choose the name of this folder but define it in openerp like in 'where-are-document-attachments-stored' response

The disadvantage is you have binary datas in source code folder.

Solution : use symbolic link and that's all

Note you have to check writing file grants

I hope i could help

Avatar
Discard
Author

Thanks. Yes we had read the post you mentioned.

As you suggest we used the command line to create the filestore and database folder as follows /opt/openerp/server/openerp/filestore/test (owner and group is openerp:openerp , permissions 775)

We edited the ir_attachment.location parameter Value to file:///opt/openerp/server/openerp/filestore/test and restarted the machine.

It does not appear to have had any effect. Under Knowledge > Configuration > Directories , we still cannot see either filestore or test listed. The directories just don't appear - no idea where we are going wrong.

Best Answer

If you are using v8 ir_attachment.location value should be "file" (file:///filestore will not work). Also, you have to add in your config folder "data_dir = /path/to/your/directory".

Avatar
Discard