I’d like to be able to print automatically some documents when Shipment state changes.
The server is on linux. I’d like to call a command line to print the generated reports from the server. Could you please point me to an example or to the way to achieve this?
There are many examples on internet about commandline printing in Linux. The best way I think is to create a temporary PDF and use that to send to the printer using the commandline. When you use a trigger for the state change, it stays outside your workflow so when printing fails no problem.
You can use Python to execute the commandline command, so when a state changes, the trigger is called. That trigger will create the report and stores it somewhere in your filesystem. Then the trigger executes a commandline command to send the report to the printer.
So first thing I would do is search the internet. Then take a PDF file and try to send it to the printer. Next thing is integrating it with the trigger system in Tryton.
Sry, it won’t fit for me, because the printer is not on the same network, I can reach it only with cups/ipp, and I don’t see in its admin how to receive email. I must say I trust more ipp thant email to respond quickly.