[FIX] snailmail: fix follow-up reports layout for snailmails
Follow-up reports were previously not handled by the commit fixing invoices. This commit aims to fix that. closes odoo/odoo#107787 X-original-commit: 768cfbe095cd6757771dcc683637fd510b0fbddb Signed-off-by: Florian Daloze (fda) <fda@odoo.com> Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
// Change address font-size if needed
|
||||
document.addEventListener('DOMContentLoaded', function (evt) {
|
||||
var recipientAddress = document.querySelector(".address.row > div[name='address'] > address");
|
||||
let baseSize = 120;
|
||||
if (!recipientAddress) {
|
||||
recipientAddress = document.querySelector("div .row.fallback_header > div.col-5.offset-7 > div:first-child");
|
||||
}
|
||||
var style = window.getComputedStyle(recipientAddress, null);
|
||||
var height = parseFloat(style.getPropertyValue('height'));
|
||||
var fontSize = parseFloat(style.getPropertyValue('font-size'));
|
||||
recipientAddress.style.fontSize = (130 / (height / fontSize)) + 'px';
|
||||
recipientAddress.style.fontSize = (baseSize / (height / fontSize)) + 'px';
|
||||
});
|
||||
|
||||
@@ -38,3 +38,28 @@ div .address.row > div[name="address"] {
|
||||
max-height: 33mm;
|
||||
}
|
||||
}
|
||||
|
||||
/* Follow-up Letters */
|
||||
div .pt-5:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div .row.fallback_header {
|
||||
margin-top: -4mm !important;
|
||||
height: 68mm !important;
|
||||
width: 117% !important;
|
||||
> div .col-5.offset-7 {
|
||||
background-color: #ffffff;
|
||||
margin-left: 48.5% !important;
|
||||
position: relative !important;
|
||||
> div:first-child {
|
||||
width: 100%;
|
||||
padding-left: 2mm !important;
|
||||
height: 33mm;
|
||||
max-height: 33mm !important;
|
||||
line-height: 1.1em;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user