[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) <qle@odoo.com>
This commit is contained in:
+5
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user