[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:
@@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user