[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) <nle@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2020-06-12 12:26:37 +00:00
parent b16843230d
commit 2d10bcb9b0
@@ -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');
}
}