summaryrefslogtreecommitdiff
path: root/addons/l10n_ch/static
diff options
context:
space:
mode:
authorYannick Vaucher <yannick.vaucher@camptocamp.com>2020-06-16 12:12:50 +0000
committeroco-odoo <oco@odoo.com>2020-07-03 13:01:15 +0000
commit3230ae6441ddd502bbf8ccea6313137669aaa31a (patch)
tree37e42920124861eaab7b7263aa2575dfbc288846 /addons/l10n_ch/static
parent28ed951dee9e1d9ad922791982c436305cc27053 (diff)
[FIX] l10n_ch - Swiss QR layout cleaning
This intend to enforce specifications and improve readability Layout changes: * [FIX] Amount section must be placed under the QR code * [FIX] Don't display empty additional information * [FIX] Rename slip sections and labels * [IMP] Rework of the layout Group content like adresse by removing line spacing Reduce character size to follow Swiss Implementation Guidelines QR-bill v2.1 Reduce left margin to avoid overlap of spaced ISR reference on the Receipt * [FIX] Missing street on Receipt * [FIX] Add thousand separators Official specs asks for: - thousand separators as blank. (using a non breaking to avoid spliting the amount) - decimal separators as a full stop > If the amount isincluded in the Swiss QR Code, then it must be printed after the currency code. A blank (space) should be used as the thousands separator and a full stop «.»as the decimal separator. The amount must always include two decimal places (e.g. CHF 1 590.00). QR-Code: * [IMP] Align QR code upper and improve accuracy of size Add an option on reportlab to print QR Code without surounding blank space this is required to compute with accuracy the width of 46mm x 46mm defined in the specs. * [FIX] Street and street2 issues Removes an extra space between street values when only one is given. Test the right partner street, only the company street was checked. QRR generation * [FIX] make it possible to generate QRR It must be possible to generate QRR without ISR subscription number. Content removed as not present in the specs version 2.1: * [RM] procedure section * [RM] due date Translations: * [IMP] Add translations of the QR-bill in DE, FR and IT * [FIX] QR-bill lang is now based on customer lang Tests: * [IMP] Add unit tests for Swiss reality check for the QR-bill closes odoo/odoo#54053 X-original-commit: 4f4edd0594b29252a5d44281cc773230c09521e9 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/l10n_ch/static')
-rw-r--r--addons/l10n_ch/static/src/scss/report_swissqr.scss93
1 files changed, 61 insertions, 32 deletions
diff --git a/addons/l10n_ch/static/src/scss/report_swissqr.scss b/addons/l10n_ch/static/src/scss/report_swissqr.scss
index 379ac0690a4..2eefad0eba0 100644
--- a/addons/l10n_ch/static/src/scss/report_swissqr.scss
+++ b/addons/l10n_ch/static/src/scss/report_swissqr.scss
@@ -19,13 +19,13 @@ body.l10n_ch_qr {
.swissqr_receipt {
position: absolute;
- background_color: white;
+ background-color: white;
border-color:black;
border-width: 1pt 1pt 1pt 1pt;
border-style: solid;
height: 131mm; /* 105 * 1.25 - 0.25 mm to cope for rendering issues due to header (probably a rounding issue) */
- width: 77.5mm; /* 62 * 1.25 */
- top: 240mm; /* 192 * 1.25 */
+ width: 77.5mm; /* 62 * 1.25 */
+ top: 240mm; /* 192 * 1.25 */
left: 0mm;
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/
}
@@ -37,56 +37,63 @@ body.l10n_ch_qr {
border-width: 1pt 1pt 1pt 1pt;
border-style: solid;
height: 131mm; /* 105 * 1.25 - 0.25mm to cope for rendering issues due to header (probably a rounding issue)*/
- width: 185mm; /* 148 * 1.25 */
- top: 240mm; /* 192 * 1.25 */
- left: 77.5mm; /* 62 * 1.25 */
+ width: 185mm; /* 148 * 1.25 */
+ top: 240mm; /* 192 * 1.25 */
+ left: 77.5mm; /* 62 * 1.25 */
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/
+
}
.swissqr {
position: absolute;
- height: 70mm;
- width: 70mm;
- top: 29.5mm;
- left: 7mm;
+ height: 57.5mm; /* 46 * 1.25 */
+ width: 57.5mm; /* 46 * 1.25 */
+ top: 20mm; /* 16 * 1.25 */
+ left: 6.25mm; /* 5 * 1.25 min readability margin for QR */
+ /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/
}
.ch_cross {
position: absolute;
background-color: white;
- height: 8.5mm;
- width: 8.5mm;
- top: 60.25mm;
- left: 37.75mm;
+ height: 8.75mm; /* 7 * 1.25 */
+ width: 8.75mm; /* 7 * 1.25 */
+ top: 44.375mm; /* (16 + 23 - 7/2) * 1.25 = 41.5 * 1.25 */
+ left: 30.625mm; /* (5 + 23 - 7/2) * 1.25 = 24.5 * 1.25 */
+ /*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/
}
.swissqr_text {
- font-family: OCR-B, Arial, Frutiger, Helvetica;
+ font-family: Arial, Frutiger, Helvetica;
color: black;
- }
+ line-height: 1;
+ padding-top: 1em;
- .swissqr_text.title {
- font-size: 9pt;
- font-weight: bold;
- }
+ .title {
+ font-size: 8pt;
+ font-weight: bold;
+ margin-top: 2mm;
+ }
+ .content {
+ font-size: 10pt;
+ }
- .swissqr_text.title.title_zone {
- font-size: 11pt;
- font-weight: bold;
}
- .swissqr_text.content {
+ .main_title {
+ margin-top: 5mm;
font-size: 11pt;
+ font-weight: bold;
}
.swissqr_column_left {
position: absolute;
- left: 12mm;
+ left: 5mm;
}
.swissqr_column_right {
position: absolute;
- left: 83mm;
+ left: 70mm; /* (5 + 46 + 5) * 1.25 */
max-width: 90mm;
}
@@ -94,23 +101,45 @@ body.l10n_ch_qr {
top: 15mm;
}
- .title_zone {
- top: 5mm;
+ .receipt_indication_zone {
+ top: 10mm;
}
.indication_zone {
top: 10mm;
}
- .amount_zone {
+ .receipt_amount_zone {
position: absolute;
- top: 106mm;
+ top: 86mm;
+
+ .column {
+ margin-right: 5mm;
+ float: left;
+ }
+ }
+
+ .receipt_acceptance_point_zone {
+ position: relative;
+ top: 100mm;
+
+ .content {
+ float: right;
+ padding-right: 1em;
+ }
+
}
- .amount {
+ .amount_zone {
position: absolute;
- left: 41mm;
+ top: 86mm;
+
+ .column {
+ margin-right: 5mm;
+ float: left;
+ }
}
+
}