Switzerland mailing list archives

switzerland@odoo-community.org

Avatar

Switzerland localization in Odoo v13.0

by
Camptocamp SA, Yannick Payot
- 04/06/2020 19:14:52
Dear Swiss OCA community,

Here is an update about the Switzerland localisation state in Odoo core 13.0 and the state of the module l10n_ch_base_bank in OCA.

As a reminder, Odoo has pledged to handle all localisations since Odoo 12.0. Which is greatly appreciated and a lot of work for them to do.

This has the downside however to not be close to the localisation needs in some cases. And leads Odoo Belgium team to think Swiss people do things in a bizarre way, which I would agree with them :)

As of today the Switzerland localisation in Odoo 13.0 core as is, is quite frustrating for users and while basic concepts might work some features are partially working, or missing.

As far as I know, to use the Switzerland localisation you currently have to use the module l10n_ch_base_bank to complete some pieces of the puzzle. My aim is to make l10n_ch_base_bank not needed anymore and keep only nice to have features in there. Features that are not required in the Odoo core module.

While the upcoming QR-Bills helps us to make a cleaning by dropping the generation of ISR payment slips we have to expect to still receive ISR invoices till 2022. IMO the main big concerns is still the confusion about ISR and ISR-B and postal account and ISR subscription numbers (postal accounts reserved to issue ISR reference starting by 01 or 03).

So in order to improve the state of the Odoo core localisation I have proposed to help Odoo with the following changes to Odoo core 13.0.


[FIX] l10n_ch: Print ISR tests

Unit tests are broken, go green.


[FIX] l10n_ch: acc_number onchange ISR handling
https://github.com/odoo/odoo/pull/51560

Fixup the partner bank acc_number field with onchange and make the difference between postal account and ISR subscription number. And make sure the onchange behaves simply but efficiently. (I will keep a more complex implementation one in l10n_ch_base_bank)

The onchange is there due to the unicity of account numbers. In case of ISR-B you can have multiple accounts with the same ISR subscription number. Which we save in field l10n_ch_postal but we need to keep the field acc_number unique.


[FIX] l10n_ch ISR number computation

Adding a field to disambiguate the current use of the field `l10n_ch_postal` which is currently used for:
- a Vendor postal account
- or for your company ISR-B customer ID for ISR generation

This change allow us to add validation on the fields more easily as with 2 (undocumented) purpose for the same field it's difficult to check it's content.

Also enforce the visual form of postal accounts and ISR subscription numbers over the 9 digits. User will tend to enter ISR subscription number as 01-162-8 and not 010001628


[IMP] l10n_ch: validation on partner bank fields

Add UI checks when entering postal account numbers and ISR subscription numbers.


[IMP] l10n_ch: Vendor ISR Reference validation
https://github.com/odoo/odoo/pull/51634

Add a check to ensure ISR references are correctly entered. Such errors could lead to failing payments with SEPA modules (OCA or enterprise).


As Camptocamp is in contact with Odoo I have good faith that we can fix and improve the functionalities of the official localisation in the following weeks.

Furthermore, for OCA modules, I have been working on the l10n_ch_base_bank module to give it some refreshing based on my PRs on Odoo core and fix unit tests.


This module should be optional, but you might still want it for some of it's features that we don't want to push to Odoo yet to focus on the important stuff.

Your help, reviews, concerns, tests and inputs will be appreciated about those PRs and the issues you are facing on the Switzerland localisation.

You will find a consolidated branch containing the last version with all the 5 patches:

Best regards,
Yannick Vaucher
Business Solutions Architect

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 30
Office: +41 21 619 10 10

Follow-Ups