From 3b428e13467c7ef77bbb77fdf557a69efbe51c5d Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Tue, 8 Jun 2021 15:29:54 +0000 Subject: [PATCH] [FIX] pos: keep same ratio width/font-size in receipt To reproduce the error: 1. In the settings of a POS, enable "Header & Footer" 2. Add this footer: "0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5" 4. Start a session 5. Validate an order - Note that in the footer, there is a line break after the third '3' 6. Print Receipt - Error: the line break is after the third '5' 7. Send the receipt by email - Error: in the receipt of the mail, the line break is after the third '2' The appearance should be the same in the three cases. On step 5, here are the values used to display the receipt: https://github.com/odoo/odoo/blob/6c1172922505cd955d278bc80d327423fc6867a6/addons/point_of_sale/static/src/css/pos.css#L1680-L1692 This fix applies the same ratio `width/font-size = 18.75` on values used to print the receipt (`266 / 18.75 = +-14`) and the ones used to generate the receipt in the mail (`512 / 18.75 = +-27`). That way, the appearance of the receipts remains similar. OPW-2528558 closes odoo/odoo#72085 X-original-commit: 26c74a1d19e838b5f7af4f3d2c9c79afc07deb27 Signed-off-by: Adrien Widart --- addons/point_of_sale/static/src/css/pos.css | 2 +- addons/point_of_sale/static/src/css/pos_receipts.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index b9ac2a14767..502a71884ef 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -1720,7 +1720,7 @@ td { margin-left: auto !important; margin-right: auto !important; border: none !important; - font-size: 13px !important; + font-size: 14px !important; width: 266px !important; } } 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 53731cc06eb..b8ed9af277f 100644 --- a/addons/point_of_sale/static/src/css/pos_receipts.css +++ b/addons/point_of_sale/static/src/css/pos_receipts.css @@ -7,7 +7,7 @@ top: 0; text-align: left; direction: ltr; - font-size: 28px; + font-size: 27px; color: #000000; }