summaryrefslogtreecommitdiff
path: root/addons/l10n_ch/static
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2017-03-14 18:11:33 +0100
committerNicolas Lempereur <nle@odoo.com>2017-03-17 07:46:18 +0100
commite3eefa093588f4ddfd6fb2a18645a31e1d1224aa (patch)
tree0fd64deb5d9da5f4c0ab12bf82341abca950e87d /addons/l10n_ch/static
parenta5b9d05b6691ff292ef5013518188791b5fd4623 (diff)
[FIX] l10n_ch: zoom isr and have margin for title
1. A zoom is needed because the virtual viewport of wkhtml is bigger than a A4 paper size. Hence we go over the size of the A4 paper with the zoom and the content is then resized down to what we want. 2. There was also an issue for example with the title (outside the isr) which had no margin so could be over the report header. 3. Tidy-up some comments in the ISR report 4. Use OCR-B font for optical reference if available task-30535
Diffstat (limited to 'addons/l10n_ch/static')
-rw-r--r--addons/l10n_ch/static/src/less/report_isr.less41
1 files changed, 32 insertions, 9 deletions
diff --git a/addons/l10n_ch/static/src/less/report_isr.less b/addons/l10n_ch/static/src/less/report_isr.less
index 5c7916928ff..be366e54ddd 100644
--- a/addons/l10n_ch/static/src/less/report_isr.less
+++ b/addons/l10n_ch/static/src/less/report_isr.less
@@ -1,15 +1,33 @@
-body.o_in_iframe {
- #l10n_ch_isr {
- background: url(/l10n_ch/static/src/img/background_virgin_isr.png) bottom no-repeat;
- background-size: 100%;
-
- &.isr-print-bank {
- background-image: url(/l10n_ch/static/src/img/background_virgin_isr_bank.png);
+body.l10n_ch_isr {
+ /*
+ all elements are positionned for A4 format (210 x 297mm) but the viewport
+ is bigger than this, hence we zoom the whole page to be bigger than the viewport
+ which will then be resized down by wkhtmltopdf to get back to an A4 format
+ */
+ zoom: 1.25;
+
+ &.o_in_iframe {
+ zoom: 1;
+
+ /* display dummy check bacground in html rendering to help see the end result */
+ #isr {
+ background: url(/l10n_ch/static/src/img/background_virgin_isr.png) bottom no-repeat;
+ background-size: 100%;
+
+ &.isr-print-bank {
+ background-image: url(/l10n_ch/static/src/img/background_virgin_isr_bank.png);
+ }
}
}
}
-#l10n_ch_isr {
+/* content outside isr needs margins to not overlap header */
+body.l10n_ch_isr #content_outside_isr {
+ padding: 15px;
+ padding-top: 150px;
+}
+
+body.l10n_ch_isr #isr {
height: 106mm;
width: 210mm;
@@ -164,7 +182,12 @@ body.o_in_iframe {
bottom: 4/6in;
text-align: right;
- font-height: 1/6in;
+
+ /* Letter spacing is set for OCRB of Tsukurimashou Font Family */
+ font-family: OCRB, Courier, monospace;
+ line-height: 0.1in;
+ font-size: 10pt;
+ letter-spacing: -0.3px;
}
}
}