[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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user