[REF] point_of_sale, pos*: convert ProxyDevice to ES6 class and service

*: pos_epson_printer, pos_restaurant, pos_six

This commit continues the work of reducing the reliance of the pos
modules on legacy features from the JS framework, such as core.Class and
mixins, by converting the ProxyDevice class to ES6 (and renaming it
HardwareProxy, to avoid confusion with DeviceProxy from iot). It also
makes it available as a service in the new environment so that we can
hopefully get rid of the legacy environment in the near future.

closes odoo/odoo#114821

Related: odoo/enterprise#37991
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Samuel Degueldre
2023-03-30 15:09:14 +02:00
parent 87941198a5
commit 25cbd9c4e7
29 changed files with 456 additions and 772 deletions
@@ -9,7 +9,7 @@ patch(PosGlobalState.prototype, "pos_epson_printer.PosGlobalState", {
var self = this;
return this._super(...arguments).then(function () {
if (self.config.other_devices && self.config.epson_printer_ip) {
self.env.proxy.printer = new EpsonPrinter(self.config.epson_printer_ip, self);
self.hardwareProxy.printer = new EpsonPrinter(self.config.epson_printer_ip, self);
}
});
},