Wednesday, November 2, 2011

Linking OpenERP to CUPS printers: base_report_to_printer by Agile Business Group


OpenERP users often require the possibility to send reports to system printers, in order to print the reports on paper directly.
In OpenERP 5, this functionality was implemented by prinjob module. It provided several functionalities, one of these was to automatically send reports to CUPS printers. After the release of OpenERP 6, the module stopped working. At that point, one of the printjob’s authors said that he wouldn’t have ported the module to OpenERP 6, so many users was left empty-handed.
Recently, I’ve picked up the issue again and, after having analysed the problems of porting printjob to OpenERP 6, I decided to realize a module that would have extrapolated the most important functionalities of printjob and better adapted to printing methods of OpenERP 6. So, base_report_to_printer was born.


The base_report_to_printer module is downloadable from or directly from our code repository. Once you installed it, the Printing menu will appear.


First of all, you have to load CUPS printers in OpenERP. You can use a wizard that retrieves them automatically. You just have to click on Update Printers from CUPS and printers will appear within the available printers list.
In the next step you will configure the reports to send to the printers.

Through the report form you can define the system’s behaviour while producing the report.

You can set a global behaviour, or differentiate it according to the user who’s printing. In the example, the global behaviour defines to send the report to client directly (Send to Client), therefore without sending it to the printer. But if user elbati is printing, the report will be sent to the selected printer (Send to Printer).

You can also define a default behaviour associated to the user, in order to establish whether a certain user, when not differently set, wants to send the reports always to a specific printer or not.
After finishing the configuration, you will just have to click on printing button associated to the report (or launch the report by a wizard or whatever) and the system will automatically send the report to the previously set printer.

Happy printing.

Written by , Agile Business Group

OpenERP addicted
Launchpad profile:
Linkedin profile:


Midcapricon said...

Hi,I have use this module in cloud server and how can I access printer to the web client.can we access local printer??or how we can connect printer in cloud server

Jay Vora said...

GoogleCloud or chromecloud.