On Thu, 2015-07-09 at 16:20 +0530, Prakhar Bansal wrote:
> Hello Tryton Community members,
> 
> Greetings !!
> 
> In tryton, there is a binary field where we can upload files. In
> several cases, we use the same to upload the pictures. Usually these
> pictures are taken from the file system where client is running.
> 
> Is there any way where we can make use of client system's web camera
> to take the photo and upload it directly onto the server.
> 
> Else, the other way will be take the pic from web camera, store on the
> system, and then upload, which is a long process. If the frequency of
> the photos coming onto the system is high, then it will become
> cumbersome for the user to upload it by this way.
> 
> Any guidance will be helpful.
> 
> Thanks in advance.


This sounds like a candidate for a Tryton client plugin.

I'm no expert on the Tryton client. However, having looked at the
crypto[1] and translation[2] client plugins, I think there are a few
options you can explore towards a solution. 

The simplest thing I can think of is a client plugin that fetches the
latest photo from a folder and applies it to the field. You could then
configure the photo-taking app to save the photos in a sequence in a
specific folder. It could even be a temp folder since you won't need the
photo after the model has been saved. 

Going further, you could make a plugin that invokes the appropriate
libraries, processes and GTK windows to show the camera output and take
the photo.

Quite interesting I say.

--
MM

[1]
http://hg.savannah.gnu.org/hgweb/health/file/199b5640c250/tryton/backend/plugins/crypto/__init__.py
[2]
http://hg.tryton.org/tryton/file/e720786195ec/tryton/plugins/translation/__init__.py

> 
> -- 
> With Best Regards, 
> 
> Py Solutions
> http://pysolutions.com
> 
> Prakhar Bansal | Founder
> Email: bansal.prak...@gmail.com 
> Mobile: +91-8800 821 089
> Skype: bansal.prakhar
> 
> FacebookTwitterLinkedIn
> 



Reply via email to