From 2d10bcb9b0064f6a0e1320b63d9c474bbd58ad78 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Wed, 10 Jun 2020 09:02:09 +0000 Subject: [PATCH] [FIX] pos_reprint: Avoid new order after reprint Configure POS with automatic receipt printing, IOTBox with receipt printer and possibility of reprinting on request Go to POS session, create an order, pay. Now on the new order add some items. Reprint the old receipt. Go back to the order. Add products. The order will be automatically cleaned as the user attempt to add new products. This occur because the add_product function will check if the current order receipt has been printed, using a flag which was set when reprinting the receipt. Reset the flag after going back to the order fix the issue. opw-2258992 closes odoo/odoo#52785 Signed-off-by: Nicolas Lempereur (nle) --- addons/pos_reprint/static/src/js/ReprintScreen.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/pos_reprint/static/src/js/ReprintScreen.js b/addons/pos_reprint/static/src/js/ReprintScreen.js index 33ee15268ac..539a7a2fd9b 100644 --- a/addons/pos_reprint/static/src/js/ReprintScreen.js +++ b/addons/pos_reprint/static/src/js/ReprintScreen.js @@ -8,6 +8,9 @@ odoo.define('pos_reprint.ReprintScreen', function (require) { class ReprintScreen extends ReceiptScreen { confirm() { this.props.resolve(); + // old order may be reprinted but + // the current is still open + this.currentOrder._printed = false; this.trigger('close-temp-screen'); } }