summaryrefslogtreecommitdiff
path: root/addons/pos_epson_printer_restaurant/static/src
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2019-09-04 14:17:48 +0000
committerAntoine Prieels <anp@odoo.com>2019-09-06 09:12:25 +0000
commit0a551bd243a9bb4d14fb6e5a09d2d6b8dafbb17d (patch)
tree43feba300a9299de0514bbbb710aff63bae4e2b7 /addons/pos_epson_printer_restaurant/static/src
parent1e06b56c84eb2fa443947606f57ae863acff4484 (diff)
[FIX] pos_epson_printer_restaurant: IoT printer selected
When selecting an Epson ePOS printer, the POS tried to print of a printer connected to an IoT Box. This happened because the override of create_printer was executed before its declaration in pos_restaurant.
Diffstat (limited to 'addons/pos_epson_printer_restaurant/static/src')
-rw-r--r--addons/pos_epson_printer_restaurant/static/src/js/multiprint.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/pos_epson_printer_restaurant/static/src/js/multiprint.js b/addons/pos_epson_printer_restaurant/static/src/js/multiprint.js
index 163a110848c..93806e98372 100644
--- a/addons/pos_epson_printer_restaurant/static/src/js/multiprint.js
+++ b/addons/pos_epson_printer_restaurant/static/src/js/multiprint.js
@@ -4,6 +4,11 @@ odoo.define('pos_epson_printer_restaurant.multiprint', function (require) {
var models = require('point_of_sale.models');
var EpsonPrinter = require('pos_epson_printer.Printer');
+// The override of create_printer needs to happen after its declaration in
+// pos_restaurant. We need to make sure that this code is executed after the
+// multiprint file in pos_restaurant.
+require('pos_restaurant.multiprint');
+
models.load_fields("restaurant.printer", ["epson_printer_ip"]);
var _super_posmodel = models.PosModel.prototype;