[FIX] snailmail: fix the font-size of the address in the report

When generating the PDF for the SnailMail report, a script is executed to
adapt the size of the address to match Pingen requirements (as per [1]).

Step to reproduce the issue:
1) Have a contact created that has VAT configure
2) Create an invoice and 'Send and Print'
3) Select the POST button to send via POST
4) In dev mode, go to Techincal > Snailmail Letters
5) Download the PDF of the newly created invoice
You should see that the font becomes extremely tiny.

Solution: There are different elements that needs to be corrected to solve the
issue.
1) The CSS used to specify the `height` requirement of the address was not
properly loaded (the path was incorrect)
2) The JS selector used into the resize script is incorrect
3) The CSS selector into the CSS file was invalid
All these issues are due to incomplete migrations.

[1]: https://github.com/odoo/odoo/commit/c50f5da4160c63dcc79900dc882cd36c9ad96b2e

opw-2819823

closes odoo/odoo#96055

X-original-commit: 7bbdbdcde2315155d17fb30d5496c3daf9a5c4cf
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
This commit is contained in:
Laurent Desausoi (lade)
2022-07-15 14:22:15 +02:00
parent 5505ef355c
commit b102b3ee83
2 changed files with 2 additions and 2 deletions
@@ -1,6 +1,6 @@
// Change address font-size if needed
document.addEventListener('DOMContentLoaded', function (evt) {
var recipientAddress = document.querySelector(".address.row > div[name='address'] > div")
var recipientAddress = document.querySelector(".address.row > div[name='address'] > address");
var style = window.getComputedStyle(recipientAddress, null);
var height = parseFloat(style.getPropertyValue('height'));
var fontSize = parseFloat(style.getPropertyValue('font-size'));
@@ -25,7 +25,7 @@
.pt-5 {
padding-top: 48px !important;
}
.article > div > .address.row > div[name="address"] {
.article > .address.row > div[name="address"] {
height: 65mm;
background-color: #ffffff;
padding-top: 11mm;