From b36e024cf1c24c7bbfbc3e1c0906be4b632a17b3 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 2 Feb 2022 15:30:36 +0000 Subject: [PATCH] [FIX] point_of_sale: Receipt not centered when printed When printing the receip in the POS, the right margin was not equal to the left margin. Introduce by https://github.com/odoo/odoo/pull/83130/commits/e14af37eb20453df8643b73f6007d6c986398b47 opw:2743902 closes odoo/odoo#83960 closes odoo/odoo#84077 X-original-commit: 26a55d017687190d7b45e3f6f86ba4fc86d81b71 Signed-off-by: Masereel Pierre --- addons/point_of_sale/static/src/js/printers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/printers.js b/addons/point_of_sale/static/src/js/printers.js index dd962daae59..948c693aaf7 100644 --- a/addons/point_of_sale/static/src/js/printers.js +++ b/addons/point_of_sale/static/src/js/printers.js @@ -99,7 +99,7 @@ var PrinterMixin = { html2canvas(self.receipt[0], { onparsed: function(queue) { queue.stack.ctx.height = Math.ceil(self.receipt.outerHeight() + self.receipt.offset().top); - queue.stack.ctx.width = Math.ceil(self.receipt.outerWidth() + self.receipt.offset().left); + queue.stack.ctx.width = Math.ceil(self.receipt.outerWidth() + 2 * self.receipt.offset().left); }, onrendered: function (canvas) { $('.pos-receipt-print').empty();