Reworked the structure of the HTML and the SCSS
to adhere to the official specs:
- 5mm padding inside the two main sections
- Correct font sizes
- Bold headers
- Increased the Swiss Cross inside the logo (7mm x 7mm)
- Scissors pictogram on the outline
- Dashed borders
Sizes now take the wkhtmltopdf (1/1.25 factor) shrinking
into consideration.
closesodoo/odoo#80544
X-original-commit: f02622684c6a220a425044d8d4a5fd474efdb519
Signed-off-by: William André (wan) <wan@odoo.com>
Issue:
When trying to print a Suisse QR bill, if multiple images are presents
in document and they have a url as src, some pictures will not be
displayed.
(Same issue may occur with simple QR code)
Cause:
It's a known issue with wkhtmltopdf: https://github.com/odoo/odoo/commit/2949138a7d84cd6c925ea1745d62f25ef077bb8b
Also, adding css class to body by js break wkhtmltopdf.
Solution:
Replace link by base64 image value (use a function to retrieve base64
image instead of image_url).
Remove class 'l10n_ch_qr' added by js (no need since CSS file didacted
to this report).
Move `_get_qr_code_base64` and `_get_qr_code_url` logic/flow
(since generic) to account module.
Move specific logic like `_get_qr_vals` and
`_get_qr_code_generation_params` to specific module (ex: l10n_ch).
extra: Alter some css for better rendering + update unitest.
opw-2620082
closesodoo/odoo#77643
X-original-commit: 699b6eeac993e3a8d97ae7949170f7e18ca05831
Signed-off-by: Olivier Colson <oco@odoo.com>
This commit implements improvements in the layout designer, such as addition of a new custom background, adds custom report footer and company details.
task-2355704
closesodoo/odoo#66860
Related: odoo/upgrade#2275
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.
So in this commit, Updated all l10n modules icon with new icon.
closesodoo/odoo#65329
Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#54053
X-original-commit: 4f4edd0594b29252a5d44281cc773230c09521e9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Before that, just one pixel from the bottom of the QR-bill frame passed got out of the page, and end out creating a second, empty page.
Since this error was probably due to some rounding issue in the way A4 dimensions were compared to the layout specified by the scss file, we solve it by rounding the height of this section a little more, removing 0.25mm from it.
[FIX] l10n_ch: qr bill report: display the payment ref under "reference" and the invoice's name as additional information
closesodoo/odoo#53453
X-original-commit: 8a6cc1a572cd04f540e4a5e83362319c13274aea
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Using it as a parf of the regular invoice pdf report was wrong, as this report is subject to the margins defined in its paper format; causing issues as for the rendering of the QR report, which must be displayed at a precise location (just like ISR). wkhtmltopdf doesn't allow having different margin values in the same file, so we did just as for ISR, and now generate QR-bill in a distinct pdf.
[IMP] l10n_ch: add receipt part to QR-bill pdf report
closesodoo/odoo#50765
X-original-commit: 99b5306545b945810e8259f2cc447b933d316778
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
OPW 2151580
There is a needed font for the swiss IRS report: OCR-B. This commit
ensures it is used.
closesodoo/odoo#41466
X-original-commit: 8f4a390cf3150a65dcdad2687eee1011b32f4fc7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
It has been reported that it would be nice to have font OCRB all over
the report and number in boxes (for the ISR version of amount with
boxes).
This commit do some tweaks and adapt positions and font-size to do this.
Also a shortcut for an account number can be used in switzerland
(see d9448d7389), but in the ISR scanline the account number must be
fully printed so this commit do the zero padding (on the middle part of
the account number).
opw-1903608
closes#29000
Purpose
=======
- Add the SwissQR Code on the invoice in aim to replace the actual ISR
- Improve the settings of the SEPA QR Code to make it more user friendly
Specifications
==============
- ln_ch:
- Add a SwissQR Code on the invoice to fit the Switzerland QR-Bill Format
- Use the "partner_bank_id" field to generate the QR Code
- Add function to get the address number out of the field "street" and "street2"
- account:
- Remove the SEPA QR Code's journal settings from the general setting
- Display the "partner_bank_id" field on the invoice "Other info" page
- Use the "partner_bank_id" field to generate the QR Code
- website_sale:
- Add a check box on the payment acquirers to use the SEPA QR Code on the e-commerce
- Use the payment acquirer "journal_id" field to generate the SEPA QR Code
In the CSS of the ISR report, we had things like:
2 + 3/12in
This was valid in less, but in SCSS there would be no CSS with error:
Error: 2.4/in isn't a valid CSS value.
on line 3350 of stdin
>> width: 2 + 4/10in;
---------------^
These expressions were just used so it is more apparent that the number
is corresponding to the standard template.
We could keep them using:
#{2 + 3/12}in
But this commit change it to directly use float number since with
margin/fonts/padding/... the expressions anyway didn't match that much
the standard template.
If user choose custom report type with background, we don't want the
background on the ISR report that is intended to be printed on
preprinted paper.
opw-1820123
closes#23743
Our positionning of the scan line (ligne de codage) was possibly wrong
depending on wkhtmltopdf.
In eg. chromium the font is configurable exactly but in wkhtmltopdf it
seems there is bigger limitation on giving eg. a decimal pixel number.
But this was necessary to have the same character positionning than
expected in BVR, and this line is read by scanner and must match.
This change:
- have an absolute positionning for each character in the scan line
- add two parameters "ISR scan line horizontal/vertical offset" that
will move the scan line to the choosen distance.
- changes some other CSS value to match better the ISR documents on
accounting on differences between wkhtmltopdf 0.1.2.1 and 0.1.4.1
- remove currency which should be on the BVR background.
opw-1813776
closes#23518
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