summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js')
-rw-r--r--addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js b/addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js
index 6abf4b2e93d..2ebdce20e3f 100644
--- a/addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js
+++ b/addons/point_of_sale/static/src/js/Misc/AbstractReceiptScreen.js
@@ -39,13 +39,9 @@ odoo.define('point_of_sale.AbstractReceiptScreen', function (require) {
return await this._printWeb();
}
}
- /**
- * https://stackoverflow.com/questions/21285902/printing-a-part-of-webpage-with-javascript
- */
async _printWeb() {
try {
- const isPrinted = document.execCommand('print', false, null);
- if (!isPrinted) window.print();
+ window.print();
return true;
} catch (err) {
await this.showPopup('ErrorPopup', {