From 4cd9bb5552a8548955488121c4bac0a0750c7b96 Mon Sep 17 00:00:00 2001 From: Robin Heinz Date: Wed, 16 Jun 2021 08:22:45 +0000 Subject: [PATCH] [FIX] point_of_sale: reprint in manage order The printer dialog was not shown when going through the manage order if there was no printer connected. In order to fix this issue, the tryReprint doesn't check anymore if a printer is connected or not. It'll print via printer if connected or show the the printer dialog. closes odoo/odoo#72230 X-original-commit: 7a7aacedde81998ec0f1a7f3283337236e56de42 Signed-off-by: Quentin Lejeune (qle) --- .../Screens/OrderManagementScreen/ReprintReceiptScreen.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/Screens/OrderManagementScreen/ReprintReceiptScreen.js b/addons/point_of_sale/static/src/js/Screens/OrderManagementScreen/ReprintReceiptScreen.js index 1bd8d332ed4..7fcc514d1bf 100644 --- a/addons/point_of_sale/static/src/js/Screens/OrderManagementScreen/ReprintReceiptScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/OrderManagementScreen/ReprintReceiptScreen.js @@ -7,18 +7,21 @@ odoo.define('point_of_sale.ReprintReceiptScreen', function (require) { const ReprintReceiptScreen = (AbstractReceiptScreen) => { class ReprintReceiptScreen extends AbstractReceiptScreen { mounted() { - this.tryReprint(); + this.printReceipt(); } confirm() { this.showScreen('OrderManagementScreen'); } - async tryReprint() { + async printReceipt() { if(this.env.pos.proxy.printer && this.env.pos.config.iface_print_skip_screen) { let result = await this._printReceipt(); if(result) this.showScreen('OrderManagementScreen'); } } + async tryReprint() { + await this._printReceipt(); + } } ReprintReceiptScreen.template = 'ReprintReceiptScreen'; return ReprintReceiptScreen;