Skip to content
Health
95/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by20/25
    2 modules depend on it
  • Maturity25/25
    In 15 Odoo series since 6.1

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
2
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.85 MB
Module directory on disk
Code analysis 0 migration notes 10 models 9 views 0 HTTP endpoints

Description

Swiss localization

This module defines a chart of account for Switzerland (Swiss PME/KMU 2015), taxes and enables the generation of a QR-bill when you print an invoice or send it by mail. The QR bill is attached to the invoice and eases its payment.

A QR-bill will be generated if: - The partner set on your invoice has a complete address (street, city, postal code and country) in Switzerland - The option to generate the Swiss QR-code is selected on the invoice (done by default) - A correct account number/QR IBAN is set on your bank journal - (when using a QR-IBAN): the payment reference of the invoice is a QR-reference

The generation of the QR-bill is automatic if you meet the previous criteria. The QR-bill will be appended after the invoice when printing or sending by mail.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
l10n_ch_pos, l10n_test_pos_qr_payment

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 9

XML IDNameModelTypeStatus
isr_partner_bank_form l10n_ch.res.partner.bank.form res.partner.bank form Inherits base.view_partner_bank_form
l10n_ch.qr_report_main l10n_ch.qr_report_main ir.ui.view qweb New
l10n_ch_account_payment_form l10n_ch.account.payment.form account.payment form Inherits account.view_account_payment_form
l10n_ch_qr_invoice_wizard_form l10n_ch.qr_invoice.wizard.form l10n_ch.qr_invoice.wizard form New
l10n_ch_report_invoice_document l10n_ch_report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
l10n_ch_swissqr_template l10n_ch_swissqr_template ir.ui.view qweb New
minimal_layout_with_report_attribute minimal_layout_with_report_attribute ir.ui.view qweb Inherits web.minimal_layout
res_config_settings_view_form res.config.settings.view.form.inherit.l10n_ch res.config.settings form Inherits account.res_config_settings_view_form
setup_bank_account_wizard_inherit account.setup.bank.manual.config.form.ch.inherit account.setup.bank.manual.config form Inherits account.setup_bank_account_wizard

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 10

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • invoice_reference_model Selection
    ondelete={'ch': <expr>} selection_add=[('ch', 'Switzerland (12 34560 00103 88500 1000 19188)')]
Public methods (0)

No public methods.

New fields (1)
  • l10n_ch_is_qr_valid Boolean
    compute='_compute_l10n_ch_qr_is_valid' help='Determines whether an invoice can be printed as a QR or not'
Public methods (4)
  • get_l10n_ch_qrr_number(self)
    Generates the QRR reference. QRR references are 27 characters long. The invoice sequence number is used, removing each of its non-digit characters, and pad the unused spaces on the left of this number with zeros. The last digit is a checksum (mod10r).
  • l10n_ch_action_print_qr(self)
    Checks that all invoices can be printed in the QR format. If so, launches the printing action. Else, triggers the l10n_ch wizard that will display the informations.
  • space_qrr_reference(self, qrr_ref)
    @api.model
    Makes the provided QRR reference human-friendly, spacing its elements by blocks of 5 from right to left.
  • space_scor_reference(self, iso11649_ref)
    @api.model
    Makes the provided SCOR reference human-friendly, spacing its elements by blocks of 5 from right to left.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • l10n_ch_reference_warning_msg Char
    compute='_compute_l10n_ch_reference_warning_msg'
Public methods (0)

No public methods.

New fields (1)
  • l10n_ch_display_qr_bank_options Boolean
    compute='_compute_l10n_ch_display_qr_bank_options'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • apply_qr_code_ch_cross_mask(self, width, height, barcode_drawing)
    @api.model
  • get_available_barcode_masks(self)
    @api.model
  • get_paperformat(self)

New fields (4)
  • classic_inv_text Text
    readonly=True
  • nb_classic_inv Integer
    readonly=True
  • nb_qr_inv Integer
    readonly=True
  • qr_inv_text Text
    readonly=True
Public methods (3)
  • action_view_faulty_invoices(self)
    Open a list view of all the invoices that could not be printed in the QR format.
  • default_get(self, fields)
    @api.model
  • print_all_invoices(self)
    Triggered by the Print All button

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • l10n_ch_display_qr_bank_options Boolean
    compute='_compute_l10n_ch_display_qr_bank_options'
  • l10n_ch_qr_iban Char
    compute='_compute_l10n_ch_qr_iban' help='Put the QR-IBAN here for your own bank accounts. That way, you can still use the main IBAN in the Account Number while you will see the QR-IBAN for the barcode. ' readonly=False store=True string='QR-IBAN'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…