Commit Graph
21 Commits
Author SHA1 Message Date
Paolo (pgi) f3e9e6f4b6 [FIX] l10n_ch: Fix QR bill according to specs
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.

closes odoo/odoo#80544

X-original-commit: f02622684c6a220a425044d8d4a5fd474efdb519
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-02 10:18:56 +00:00
Nasreddin Boulif (bon) 0e50113f69 [FIX] base,l10n_ch,account_qr_code_sepa,payment,websitesale: Display all QR codes in QR bill
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

closes odoo/odoo#77643

X-original-commit: 699b6eeac993e3a8d97ae7949170f7e18ca05831
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-08 09:25:47 +00:00
Leonardo Pavan Rocha bc40795c56 [IMP] base: base layout designer improvements
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

closes odoo/odoo#66860

Related: odoo/upgrade#2275
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-25 10:33:31 +00:00
bat-odoo feca3ad527 [IMP] base: update l10n icons
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.

closes odoo/odoo#65329

Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:01:43 +00:00
wan 8aa68445a6 [IMP] l10n_*: remove icon.png and use country_fla from base
* We are gaining ~1.2MB by doing this.
* The flags are unified with the same looks.
* Some flags were missing.
2021-01-15 15:56:47 +00:00
Christophe Monniez 36cfe7cf75 [FIX] l10n_ch: use public domain ocrb otf file
X-original-commit: f882f20d8661549835b51244ae700446c27e172a
2020-12-14 09:06:45 +00:00
Yannick Vaucher 3230ae6441 [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>
2020-07-03 13:01:15 +00:00
fw-bot 0d327e2d81 [FIX] l10n_ch: don't add an empty page on QR-bill pdf report when a header is displayed
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

closes odoo/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>
2020-06-22 16:03:59 +00:00
oco-odoo e997bf14b3 [FIX] l10n_ch: fix QR-bill pdf report so that it matches the spec
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

closes odoo/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>
2020-05-07 08:18:35 +00:00
wan 33edd63510 [FIX] l10n_ch: use OCRB font
OPW 2151580
There is a needed font for the swiss IRS report: OCR-B. This commit
ensures it is used.

closes odoo/odoo#41466

X-original-commit: 8f4a390cf3150a65dcdad2687eee1011b32f4fc7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-05 16:16:30 +00:00
Nicolas Lempereur 3fd009a7a7 [FIX] l10n_ch: style imp and add 0 on account isr
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
2018-11-30 15:38:44 +00:00
sed-odoo 3a883e6728 [IMP] l10n_ch,account,website_sale: Add SwissQR Code on invoice and improve the SEPA QR Code usability
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
2018-09-20 09:41:06 +02:00
Nicolas Lempereur 25de4a5426 [FIX] l10n_ch: adapt ISR report CSS to SCSS
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.
2018-07-30 12:06:37 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
Nicolas Lempereur 3f5663e995 [FIX] l10n_ch: ignore stylistic background
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
2018-03-20 13:47:15 +01:00
Nicolas Lempereur 0ddcdb1315 [FIX] l10n_ch: config and css ISR scanline offset
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
2018-03-09 16:26:31 +01:00
Nicolas Lempereur e3eefa0935 [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
2017-03-17 07:46:18 +01:00
Nicolas Lempereur 9d42807ce3 [IMP] l10n_ch: position isr report elements 2017-03-03 16:13:08 +01:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Antony Lesuisse fc70550ca2 [IMP] move html module description and icon
bzr revid: al@openerp.com-20130628100441-swpanf2jwcojygh4
2013-06-28 12:04:41 +02:00
Raphael Collet cc748d6b4e [ADD] l10n: add icons in account chart modules (use country flags)
bzr revid: rco@openerp.com-20120402124843-s7s7hqn0nar477fk
2012-04-02 14:48:43 +02:00