diff --git a/addons/point_of_sale/static/src/css/pos_receipts.css b/addons/point_of_sale/static/src/css/pos_receipts.css index dbb94517ae6..ad064c3d091 100644 --- a/addons/point_of_sale/static/src/css/pos_receipts.css +++ b/addons/point_of_sale/static/src/css/pos_receipts.css @@ -1,6 +1,4 @@ .pos-receipt-print { - /*The receipt must be in the top left corner when rendered by html2canvas*/ - margin: -8px; width: 512px; text-align: left; direction: ltr; diff --git a/addons/point_of_sale/static/src/js/printers.js b/addons/point_of_sale/static/src/js/printers.js index 1b322697285..3ceeb97ed89 100644 --- a/addons/point_of_sale/static/src/js/printers.js +++ b/addons/point_of_sale/static/src/js/printers.js @@ -46,23 +46,11 @@ var PrinterMixin = { */ htmlToImg: function (receipt) { var self = this; - $('.pos-receipts').html(receipt); - $('.pos-receipts>.pos-receipt').addClass('pos-receipt-print'); + $('.pos-receipt-print').html(receipt); var promise = new Promise(function (resolve, reject) { html2canvas($('.pos-receipt-print')[0], { - background :'#FFFFFF', - height: $('.pos-receipt-print').outerHeight(), - ignoreElements: function (node) { - // By default, html2canvas copies the whole DOM even if we just capture a part - // of it. When copying the list of products, it gets all of the product from the - // backend. We ignore the content of