[FIX] pos_restaurant: fix blank receipt print
Current behavior: When trying to print the bill in PoS restaurant from a mobile device, the bill appears completely blank. Steps to reproduce: - Open Odoo on mobile device - Go to PoS restaurant - Create an order - Click on the "Bill" button - Click on the "Print" button - The bill is completely blank This is happening because on mobile after clicking on the "Print" button the pos directly return to the order screen. What happens when you do `window.print()` is you basically do a screenshot of the screen with some specific CSS rules. But on mobile, we go back too fast on the order screen and the screenshot is empty. opw-3507918 closes odoo/odoo#138282 X-original-commit: ebf214944097b9731a2a5dcf53d367715ceb8a35 Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com> Signed-off-by: Robin Engels (roen) <roen@odoo.com>
This commit is contained in:
@@ -6,8 +6,10 @@ import { registry } from "@web/core/registry";
|
||||
export class BillScreen extends ReceiptScreen {
|
||||
static template = "pos_restaurant.BillScreen";
|
||||
confirm() {
|
||||
this.props.resolve({ confirmed: true, payload: null });
|
||||
this.pos.closeTempScreen();
|
||||
if (!this.env.isMobile) {
|
||||
this.props.resolve({ confirmed: true, payload: null });
|
||||
this.pos.closeTempScreen();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @override
|
||||
|
||||
Reference in New Issue
Block a user