[IMP] snailmail: Modify the CSS to be compatible with all layouts and Pingen v2

Necessary improvement to the snailmail invoice layout for snailmail to work since Pingen has deprecated their v1 API with the plan to shut it down at the end of 2022 + their v2 API's validation is stricter.

closes odoo/odoo#103806

X-original-commit: 69950a650115536f2d57b1f68b5adadd4c0453f3
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
This commit is contained in:
Solan Delvenne (sode)
2022-10-28 14:20:53 +02:00
parent 08deba16b3
commit 447d522ac0
2 changed files with 37 additions and 50 deletions
@@ -4,5 +4,5 @@ document.addEventListener('DOMContentLoaded', function (evt) {
var style = window.getComputedStyle(recipientAddress, null);
var height = parseFloat(style.getPropertyValue('height'));
var fontSize = parseFloat(style.getPropertyValue('font-size'));
recipientAddress.style.fontSize = (85 / (height / fontSize)) + 'px';
});
recipientAddress.style.fontSize = (130 / (height / fontSize)) + 'px';
});
@@ -1,53 +1,40 @@
/* Generic report layouts*/
.header {
max-height: 40mm;
overflow: hidden;
}
.container {
margin-top: 5mm;
}
.o_standard_footer, .o_clean_footer, .o_boxed_footer, .o_background_footer {
max-height: 90px !important;
overflow: hidden;
width: 95%;
div > div:first-child {
padding-left: 10mm;
}
}
.o_background_footer {
padding-left: 8mm;
}
.article>.page {
> h1, > h2, > h3 {
width: 50%;
}
}
.pt-5 {
padding-top: 48px !important;
}
.article > .address.row > div[name="address"] {
height: 65mm;
background-color: #ffffff;
padding-top: 11mm;
padding-left: 5mm;
padding-bottom: 5mm;
left: -20px !important;
address {
height: 28mm;
/*Modifications for the Standard and Boxed document layouts */
.article.o_report_layout_standard.o_company_1_layout, .article.o_report_layout_boxed.o_company_1_layout {
> .pt-5 {
> .address.row {
width: 100.5% !important;
height: 55mm;
margin-top: -13mm;
> div[name="address"] {
padding-top: 5mm;
}
}
}
}
/*l10n_de_din layout*/
.din {
.invoice_address {
top: 27.7mm !important;
}
&.article {
.page {
top: 18.46mm !important;
}
}
&.o_background_footer {
top: -8mm !important;
/*Modifications for Bold and Striped document layouts*/
.article.o_report_layout_bold.o_company_1_layout, .article.o_report_layout_striped.o_company_1_layout {
> .address.row {
width: 100.5% !important;
height: 60mm;
margin-top: -6mm;
> div[name="address"] {
padding-top: 13mm;
}
}
}
div .address.row > div[name="address"] {
position: relative !important;
width: 103mm !important;
background-color: #ffffff;
> address {
width: 100% !important;
position: absolute !important;
bottom: 0 !important;
padding-left: 6mm;
padding-top: 3mm;
height: 33mm;
max-height: 33mm;
}
}