Attach image from source

I was wondering if exist any way to attach a image from the scanner source to a record by a simple click in Tryton as exist in other programs (frecuently image programs). It would be very useful and speedy. Now we have to use the scanner program, save the image at a directory temporaly, attach it to the record and then erase it from the directory. I think that adding this feature would increase the use of the attaching feature.
Thanks in advance.
Jerónimo from Argentina.

I do not think there is a standard API to communicate with scanners (and neither cross-platform).
But I think it should not be difficult to create a client plugin that adds this feature for a specific scanner.

That sounds good. ¿Any idea from where to explore? ¿Is there any guide to deploy a plug-in? Thanks!

There is the default translation plugin in tryton/plugins that can be used as example.
For deployment, you must just drop it in the plugins directory.

Perfect! I’m going to explore. If I can do something functional I’m going to share it here. Thanks!

Hi! @ced is there any documentation regard how to develop a plug-in for tryton client? I remember that b2ck gaves a video-tutorial about this stuff, but I did not found any documentation or video at youtube channel talking about plugin development.

@jeromarquez I found some other tryton plugins that can be an example for your needs. The GNU Health Camera plugin developed by GNU Health.

See ya!

1 Like

@jeromarquez Have you managed to develop it? I need a similar feature and I would be happy to share efforts.

Sorry I didn’t see this thread earlier.

Many years ago, we created a library named nanscan which among other things provided a single interface to connect with scanners that worked on both Windows (using Twain) and Linux (using Sane).

Here are the most relevant parts:

https://github.com/NaN-tic/nanscan/blob/master/NanScan/Scanner.py
https://github.com/NaN-tic/nanscan/tree/master/NanScan/Backends

It also provided Qt Dialogs and widgets to show the scanned thumbnails and it was able to store that information into OpenERP.

There was also a plugin for Koo (the Qt-based OpenERP client we developed) that allowed to scan directly from the ERP interface, just like Cédric suggested.

Hope this helps!

1 Like

Thanks, @albert!
I think this will help