[FIX] point_of_sale: large canvas is sent to the printer
In screen with high dpi, scale of the canvas generated by html2canvas is larger than normal (defaulting to scale 2). Apparently, receipt printers don't recognize this so in this fix, we force the scale to 1. closes odoo/odoo#98796 Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -105,6 +105,7 @@ var PrinterMixin = {
|
||||
return html2canvas(this.receipt[0], {
|
||||
height: Math.ceil(this.receipt.outerHeight() + this.receipt.offset().top),
|
||||
width: Math.ceil(this.receipt.outerWidth() + 2 * this.receipt.offset().left),
|
||||
scale: 1,
|
||||
}).then(canvas => {
|
||||
$('.pos-receipt-print').empty();
|
||||
return this.process_canvas(canvas);
|
||||
|
||||
Reference in New Issue
Block a user