[英]How do I Integrate OpenERP 7.0 with external file hosting service?
I am trying to integrate OpenERP 7.0 with an existing file hosting system in my institution. 我正在尝试将OpenERP 7.0与我所在机构中的现有文件托管系统集成。 For that, I would present an upload form to users, and then send this file to the host via webservice, and would get back the id of the file on the remote server and store it on OpenERP database, with some other info such as file name, description and date / time of upload, for example...
为此,我将向用户提供一个上传表单,然后通过Web服务将该文件发送到主机,然后将其在远程服务器上的文件ID取回,并将其与其他一些信息(如文件)一起存储在OpenERP数据库中上传的名称,说明和日期/时间,例如...
It seams to me that I would have to build (fully or partly) a web client in order to do that, and I'm not exactly at ease with that idea, so I have a lot of questions on this subject. 我的想法是,我必须(全部或部分)构建一个Web客户端才能做到这一点,但是我对这个想法并不完全放心,所以我对此有很多疑问。 Please someone could give me some examples or point me in the right direction (I've been searching google for weeks on this matter and still didn't find any info on this subject).
请有人可以给我一些例子,或指出正确的方向(我在这件事上搜索谷歌已有数周之久,但仍未找到有关此主题的任何信息)。
My questions are: 我的问题是:
1 - How do I present the upload form in xml? (I'm guessing that if I use the field.binary() in my model, the <input type="file" /> will be shown in the client, but then, the file will be stored in OpenERP database, and that's not what I want...)
2 - How do I contact the remote service and receive his response (both upload and download files)
3 - How do I build the view in XML to download files?
Many thanks to whoever helps in this matter! 非常感谢在这个问题上有帮助的人!
Check this documentation for OpenERP XMLRPC 查看此文档了解OpenERP XMLRPC
https://doc.openerp.com/6.0/developer/6_22_XML-RPC_web_services/ https://doc.openerp.com/6.0/developer/6_22_XML-RPC_web_services/
https://doc.openerp.com/trunk/web/rpc/ https://doc.openerp.com/trunk/web/rpc/
Better you can use middleware like bottle for web services other than OpenERP Web Service 更好的是,您可以将瓶之类的中间件用于OpenERP Web Service以外的Web服务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.