Thursday, March 27, 2025
1 change · 17.0
New functionality added to Odoo
Introduces a new script intended to support printing point-of-sale receipts and kitchen order tickets on thermal printers. The current change appears to provide a placeholder structure, so business value depends on completing the actual printer integration logic.
Original PR description
In this script:ThermalPrinter class contains methods for printing POS receipts (print_pos_receipt) and KOTs (print_kot).Inside each method, you would include the actual code to format and send the print commands to the thermal printer using the xthermal driver. This may involve using libraries like escpos for generating ESC/POS commands.The if __name__ == "__main__": block demonstrates how you can use the ThermalPrinter class by creating an instance and calling its methods with sample data.Replace the placeholder code with actual logic to communicate with the xthermal driver and send print commands to your thermal printer.