[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 <adwid@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
top: 0;
|
||||
text-align: left;
|
||||
direction: ltr;
|
||||
font-size: 28px;
|
||||
font-size: 27px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user