Initial commit: L10N_Europe packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit 9803722600
2377 changed files with 380711 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<odoo>
<template id="l10n_ch_report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@id='qrcode']" position="attributes">
<attribute name="t-if" add="and o.qr_code_method != 'ch_qr'" separator=" "/>
</xpath>
</template>
</odoo>

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="isr_invoice_form" model="ir.ui.view">
<field name="name">l10n_ch.account.invoice.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='is_move_sent']" position="after">
<field name="l10n_ch_isr_sent" invisible="1"/>
<field name="l10n_ch_currency_name" invisible="1" readonly="1"/>
<field name="l10n_ch_is_qr_valid" invisible="1"/>
</xpath>
<header position="after">
<field name="l10n_ch_isr_needs_fixing" invisible="1"/>
<div groups="account.group_account_invoice" class="alert alert-warning" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('l10n_ch_isr_needs_fixing', '=', False)]}">
Please fill in a correct ISR reference in the payment reference. The banks will refuse your payment file otherwise.
</div>
</header>
</field>
</record>
<record id="isr_invoice_search_view" model="ir.ui.view">
<field name="name">l10n_ch.invoice.select</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<field name="l10n_ch_isr_number" string="ISR reference number"/>
</xpath>
</field>
</record>
<!--Overridden action (and primary child view), so the filter are only
available for customer invoices-->
<record id="account.action_move_out_invoice_type" model="ir.actions.act_window">
<field name="name">Customer Invoices</field>
<field name="res_model">account.move</field>
<field name="search_view_id" ref="isr_invoice_search_view"/>
</record>
<record id="l10n_ch_qr_server_action" model="ir.actions.server">
<field name="name">Print QR Invoices</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.l10n_ch_action_print_qr()
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="l10n_ch_qr_invoice_wizard_form" model="ir.ui.view">
<field name="name">l10n_ch.qr_invoice.wizard.form</field>
<field name="model">l10n_ch.qr_invoice.wizard</field>
<field name="arch" type="xml">
<form string="QR printing encountered a problem">
<field name='nb_qr_inv' invisible="1"/>
<field name="nb_classic_inv" invisible="1"/>
<field name="nb_isr_inv" invisible="1"/>
<p>
<field name="qr_inv_text"/>
<field name="isr_inv_text"/>
<field name="classic_inv_text"/>
</p>
<p>
To be able to print all invoices in the QR format, you might need to : <br/>
- check the account is a valid QR-IBAN<br/>
- or check your company and the partners are located in Switzerland.<br/>
Press Check Invalid Invoices to see a list of the invoices that were printed without an ISR or a QR.
</p>
<footer>
<button name="print_all_invoices" string="Print All" type="object" class="btn-primary"/>
<button name="action_view_faulty_invoices" string="Check invalid invoices" type="object"/>
</footer>
</form>
</field>
</record>
<record id="l10n_ch_qr_invoice_wizard" model="ir.actions.act_window">
<field name="name">Qr Batch error Wizard</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">l10n_ch.qr_invoice.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="l10n_ch_qr_invoice_wizard_form"/>
<field name="target">new</field>
</record>
</odoo>

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="isr_partner_bank_form" model="ir.ui.view">
<field name="name">l10n_ch.res.partner.bank.form</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='acc_number']" position="after">
<field name="l10n_ch_qr_iban" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<label for="l10n_ch_postal" string="ISR Client Identification Number" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<field name="l10n_ch_postal" nolabel="1" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<field name="l10n_ch_postal" attrs="{'invisible': [('l10n_ch_show_subscription', '=', True)]}"/>
<field name="l10n_ch_show_subscription" invisible="1"/>
<field name="l10n_ch_isr_subscription_chf" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<field name="l10n_ch_isr_subscription_eur" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
</xpath>
</field>
</record>
<record id="isr_partner_bank_tree" model="ir.ui.view">
<field name="name">l10n_ch.res.partner.bank.tree</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='acc_number']" position="after">
<field name="l10n_ch_postal" invisible="1"/>
</xpath>
</field>
</record>
<record id="isr_partner_property_bank_tree" model="ir.ui.view">
<field name="name">l10n_ch.res.partner.property.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='acc_number']" position="after">
<field name="l10n_ch_postal" invisible="1"/>
</xpath>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.l10n.ch</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='invoicing_settings']" position="inside">
<div class="col-12 col-lg-6 o_setting_box" id="l10n_ch-isr_print_bank" attrs="{'invisible': [('country_code', '!=', 'CH')]}">
<div class="o_setting_left_pane">
<field name="l10n_ch_isr_print_bank_location"/>
</div>
<div class="o_setting_right_pane">
<label for="l10n_ch_isr_print_bank_location"/>
<div class="text-muted">
Print the coordinates of your bank under the &apos;Payment for&apos; title of the ISR.
Your address will be moved to the &apos;in favour of&apos; section.
</div>
<div class="content-group" attrs="{'invisible': [('l10n_ch_isr_print_bank_location', '=', False)]}">
<div class="row mt16">
<label for="l10n_ch_isr_preprinted_bank" class="col-lg-4 o_light_label"/>
<field name="l10n_ch_isr_preprinted_bank"/>
</div>
<div class="row">
<label for="l10n_ch_isr_preprinted_account" class="col-lg-4 o_light_label"/>
<field name="l10n_ch_isr_preprinted_account"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="l10n_ch-isr_print_scanline_offset" attrs="{'invisible': [('country_code', '!=', 'CH')]}">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<span class="o_form_label">ISR scan line offset</span>
<div class="text-muted">
Offset to move the scan line in mm
</div>
<div class="content-group">
<div class="row mt16">
<label for="l10n_ch_isr_scan_line_top" class="col-lg-4 o_light_label"/>
<field name="l10n_ch_isr_scan_line_top"/>
</div>
<div class="row">
<label for="l10n_ch_isr_scan_line_left" class="col-lg-4 o_light_label"/>
<field name="l10n_ch_isr_scan_line_left"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="setup_bank_account_wizard_inherit" model="ir.ui.view">
<field name="name">account.setup.bank.manual.config.form.ch.inherit</field>
<field name="model">account.setup.bank.manual.config</field>
<field name="inherit_id" ref="account.setup_bank_account_wizard"/>
<field name="arch" type="xml">
<field name="bank_bic" position="after">
<field name="l10n_ch_show_subscription" invisible="1"/>
<field name="l10n_ch_isr_subscription_chf" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<label for="l10n_ch_postal" string="ISR Client Identification Number" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<field name="l10n_ch_postal" nolabel="1" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
<field name="l10n_ch_qr_iban" attrs="{'invisible': [('l10n_ch_show_subscription', '=', False)]}"/>
</field>
</field>
</record>
</data>
</odoo>