Commit Graph
9 Commits
Author SHA1 Message Date
lejeune quentin ef09a4f44e [FIX] hw_drivers: Fix printer unknow in PrinterDriver
We add a condition to add printer.
Printer, for protocol DNSSD and LPD, must have a "model"

closes odoo/odoo#41591

X-original-commit: a07f118fc7182fa96344fad4a0164ed86c446352
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-12-09 12:47:59 +00:00
Antoine Prieels 53bc9dcdc6 [FIX] hw_drivers: Print status ESC/POS printers
The status ticket contains ESC/POS commands but was printed on all
printers connected in USB. Plugging a printer that doesn't support
ESC/POS resulted in undefined behaviors.

We now only print this status ticket on ESC/POS printers.

closes odoo/odoo#40972

X-original-commit: c6a28b627cbe6f8bd1da4321c1329cbc1bde498d
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2019-11-27 09:18:33 +00:00
Antoine Prieels 7cb540b485 [REM] hw_drivers: Remove printers list from status
The status returned bby PrinterDriver contained a list of connected
printers to be used in Enterprise, to determine if the printer that was
selected in POS Config was used in the POS. We now read this status
from the db and we therefore don't need this anymore.

In Community the user only needs to know if there's a printer connected
to the Box. We just have to know if any printer is present.

TaskID: 1970884
2019-09-17 08:31:32 +00:00
Antoine Prieels dc4090a3b4 [FIX] hw_drivers: Status of network printers in POS
When selecting a network printer in the POS the status of the proxy
showed "Printer Disconnected" because the list returned by the driver
only contained USB printers.
2019-09-03 13:51:30 +00:00
Antoine Prieels 70006311d0 [IMP] hw_drivers, hw_posbox_homepage: get_ssid helper
Create a helper to get the ssid of the wifi to which the Box is
connected.
2019-09-04 13:10:03 +00:00
Antoine Prieels 7cb9518857 [IMP] hw_drivers: PrinterDriver get hotspot name for status ticket
When the IoT Box is not connected to the IoT Box, a hotspot would be
created to configure it. The name of this hotspot is printed on a
status receipt if a printer is connected. Previously, this ticket only
showed the default name of the hotspot, but this name will be different
if the user renamed the Box. We then read the name of the hotspot from
the config.

closes odoo/odoo#33095

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-08 11:53:37 +00:00
Antoine Prieels 463c0ff3a2 [IMP] hw_drivers: Print Star printers notice
We communicate with receipt printers using the ESCPOS drivers.
By default, Star printers use the Star mode. This can be changed by
modifying the position of the DIP-Switches at the bottom of the
printer.

We provide a link to the documentation to the user if its printer is
not correctly configured.
2019-08-08 11:53:37 +00:00
Antoine Prieels 03b2f7b77d [REF] pos: Replace hw_escpos by PrinterDriver
ESCPOS printers are now supported as IoT Devices, just like any other
printer. We now transform the receipts to JPGs, transform these JPGs
into ESCPOS commands and send them via Cups, adding support for network
printers. Since we now print images, we can now print special
characters and therefore add support for other languages such as
Arabic.

The JPG is generated in the browser, with the help of html2canvas.

`hw_escpos` is left untouched to allow backward compatibility and
should be removed when v12 is no longer supported.

In the PoS, all the code for printing has been moved from ProxyDevice
to a separated JS file.

TaskID: 1939455
2019-08-08 11:53:37 +00:00
Antoine Prieels dd7de1bcb6 [IMP] hw_drivers: Move PrinterDriver to Community
Printers should be usable by IoT Boxes connected to a community DB.

TaskID: 1939455
2019-08-08 05:47:03 +00:00