[IMP] pos_self_order: ignore printing error

In this commit we hide the printing errors in `pos_self_order`.
At the moment, they are show to the user, but that is not
desirable behavior in a kiosk environment.

Such printing errors might, for example, be encountered when the printer
is out of paper.

closes odoo/odoo#140271

Signed-off-by: David Monnom (moda) <moda@odoo.com>
This commit is contained in:
vlst
2023-10-31 14:40:53 +00:00
parent 35e22b8fe9
commit a4792a373e
@@ -28,10 +28,14 @@ export class ConfirmationPage extends Component {
}, 5000);
setTimeout(() => {
this.printer.print(OrderReceipt, {
data: this.selfOrder.export_for_printing(this.confirmedOrder),
formatCurrency: this.selfOrder.formatMonetary,
});
try {
this.printer.print(OrderReceipt, {
data: this.selfOrder.export_for_printing(this.confirmedOrder),
formatCurrency: this.selfOrder.formatMonetary,
});
} catch (e) {
console.error(e);
}
}, 500);
}
});