This question has been flagged
5 Replies
6244 Views

Is it possible to manage documents using ftp in odoo 8, like using module documents_ftp for v7?

Avatar
Discard
Best Answer

You can try document_fs

 https://github.com/odoo/odoo-extra/tree/master/document_fs

It create a filesystem in the form /<model_name>/<id>/<attachement> then configure an ftp server to that directory. Upload is supported altought not transactional.

Avatar
Discard
Best Answer

Actualy the "document_ftp" module was just extension of module "Document Management System" (technical name: document) that is still present in v8. "document" module can save files in database or in local filesystem depending on configuration. if document_ftp no more available in v8, you may consider to use it's base dependecy, the "document" module and either use as is or extend it to add ftp support (migrating document_ftp to v8.0 may be also solution).

Avatar
Discard
Author

I have tried to do that but got stuck in an error due to netsvc, as the DB cannot be opened using the service. And netsvc is depricated and only supported for workflow in odoo 8.

Author

How can I use change DMS to store in file system location?

in v7.0 you can specify location for filestore at "Settings/Technical/Parameters/System Parameters" page, by adding record with Key: ir_attachment.location and Value: file:///my/filestore/path this setting will set "my/filestore/path" location under "openerp" folder and all attachment files will go into that location ( as "openerp/my/filestore/path/DatabaseName/...." ), saved files are named with self hash codes, not original filenames, but you can find relation between original name and hashcode name in ir_attachment object. where ir_attachment.datas_fname is the ofiginal filename and ir_attachment.store_fname is indicating it's name in file system, so the file may be found at: "openerp/${path from "ir_attachment.location" setting}/${Database Name}/${ir_attachment.datas_fname}"
in v8.0 there is some changes and 'ir_attachment.location' setting does not works. but I think you can use such workaround as change or override filestore() function in openerp/tools/config.py (that returns path where files should stored) or use "-D" or "--data-dir" command line option of odoo, when runing odoo (as: --data-dir=/full/path/to/data/dir) but it will redirect to the indicated location all data not only filestore for attachments, but filestore will be included...
Note: the filestore location should have write asses for odoo server user in order to save files in.