diff --git a/pos_ticket_without_price/static/src/js/screens.js b/pos_ticket_without_price/static/src/js/screens.js index 0af66262..2cab06d6 100644 --- a/pos_ticket_without_price/static/src/js/screens.js +++ b/pos_ticket_without_price/static/src/js/screens.js @@ -28,8 +28,14 @@ odoo.define('pos_ticket_without_price.screens', function (require) { var button_print_ticket_without_price = this.$('.button.print_ticket_without_price'); button_print_ticket_without_price.click(function () { - self.render_ticket_without_price(); - self.print(); + console.log("self.pos.config.iface_print_via_proxy") + console.log(self.pos.config.iface_print_via_proxy) + if (!self.pos.config.iface_print_via_proxy) { + self.render_ticket_without_price(); + self.print(); + } else { + self.proxy_render_ticket_without_price(); + } }); }, @@ -40,6 +46,12 @@ odoo.define('pos_ticket_without_price.screens', function (require) { this.get_receipt_render_env())); }, + proxy_render_ticket_without_price: function() { + var receipt = QWeb.render('XmlReceiptWithoutPrice', this.get_receipt_render_env()); + this.pos.proxy.print_receipt(receipt); + this.pos.get_order()._printed = true; + }, + }); }); diff --git a/pos_ticket_without_price/static/src/xml/pos.xml b/pos_ticket_without_price/static/src/xml/pos.xml index 1d646c83..f26f9919 100644 --- a/pos_ticket_without_price/static/src/xml/pos.xml +++ b/pos_ticket_without_price/static/src/xml/pos.xml @@ -30,4 +30,35 @@ + + +

TICKET WITHOUT PRICE

+
+ + + + + + + x + +
+
+
+ + + + + + + + + + + + + + + +