Community mailing list archives

community@mail.odoo.com

Dual printer in PosBOX (Receipt and Kitchen printer in same machine)

by
Mario Arias Badila
- 03/27/2016 23:19:21
Hi,

In case anyone is in need of a dirty hack to install two printers on one machine, to be used under PosBox, we just did some small modifications to hw_escpos to create hw_serialescpos.

We installed two PosBox instances on the same machine, one with regular hw_escpos, in charge of the receipt printer connected using USB, and a second instance with the hw_serialescpos, that connects to printer using Serial Port instead.

This way we could also place this second printerin the kitchen, far away from the PosBox machine, using a serial cable, breaking the limit of 5 meters on USB cables without needing active USB hubs and/or active USB cables...

If you just need two USB printers, you will need to update hw_escpos to track bus and device number for each printer, and then take that into account when selecting the printer to use...

The hw_serialescpos module can be found in the following repo:
https://github.com/TheCloneMaster/point_of_sale

Keep in mind that pos_restaurant module appends port 8069 to ANY proxy address that you define for Kitchen printer, so you have to use that port for your serial esc/pos PosBox instance, or fix pos_restaurant so it does'n add the default port.

Also, hw_serialescpos module asumes that your are using a USB to Serial cable, so device is asummed to be /dev/ttyUSB0.  You will need to adjust this to your needs...

Finally, serial port communications are not very refined, specially at error handling.  If you find errors (and solutions) please create PRs

Regards,
-Mario