[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 <pim@odoo.com>
This commit is contained in:
Goffin Simon
2022-02-07 14:18:14 +00:00
committed by Pierre Masereel
parent 4911a26d2c
commit b36e024cf1
@@ -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();