On Wednesday, 13 December 2017 10:40:06 UTC+1, Cédric Krier wrote: > On 2017-12-13 01:13, edbo wrote: > > But the question remains: Is it possible? > > Yes probably. Plugins are kind of wizard that run on client side.
This is very interesting, it basically means that you can read data from a COM-port and put that data into the database through the Tryton-client?. > > and if so, how can we execute a plugin-command from the client? > > The plugins appears in the action menu of the form. > The plugin can decide on which model to appear thanks to the > 'get_plugins(model)' method. I looked into the translation-plugin and think I get an idea on how to get it working. > > So a user clicks on the (new?) print button and in the background the > > labelsoftware is started, a predefined label with variables is opened > > (just like a odt-report) and filled in with the data the plugin got > > from the Tryton-client. > > I guess you will have to retrieve the report using RPC calls and send it > to the printer. We are using a programm called NiceLabel to create a label with several variables and store it somewhere. Then we start the Tryton-client and select a set of products (first or in the "wizard") en click on "print". Then in the background (using Python) we start NiceLabel, open the created label en replace the variables with the data we get from Tryton-database. Next we print the label. It means that Tryton doesn't do anything with the label other then give the data for the label. > But indeed you may be interested by https://bugs.tryton.org/issue6999, I > think we will allow to customize the command to do direct printing. In > this case, you could write a script that will recognize the label and > send it to the right printer. The label-format is binary and you need the labelsoftware to read that. So Tryton-report-engine cannot do anything with it. -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/b7adc972-cc00-4467-9907-5797c5cfd2e7%40googlegroups.com.