mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-26 04:22:07 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
|
|
@ -3,14 +3,8 @@
|
|||
|
||||
Swiss localization
|
||||
==================
|
||||
This module defines a chart of account for Switzerland (Swiss PME/KMU 2015), taxes and enables the generation of ISR and QR-bill when you print an invoice or send it by mail.
|
||||
|
||||
An ISR will be generated if you specify the information it needs :
|
||||
- The bank account you expect to be paid on must be set, and have a valid postal reference.
|
||||
- Your invoice must have been set assigned a bank account to receive its payment
|
||||
(this can be done manually, but a default value is automatically set if you have defined a bank account).
|
||||
- You must have set the postal references of your bank.
|
||||
- Your invoice must be in EUR or CHF (as ISRs do not accept other currencies)
|
||||
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
|
||||
|
|
@ -18,11 +12,8 @@ A QR-bill will be generated if:
|
|||
- 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 ISR and QR-bill is automatic if you meet the previous criteria.
|
||||
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.
|
||||
|
||||
Here is how it works:
|
||||
- Printing the invoice will trigger the download of three files: the invoice, its ISR and its QR-bill
|
||||
- Clicking the 'Send by mail' button will attach three files to your draft mail : the invoice, the ISR and the QR-bill.
|
||||
|
||||
|
||||
## Installation
|
||||
|
|
@ -33,38 +24,17 @@ pip install odoo-bringout-oca-ocb-l10n_ch
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- account
|
||||
- l10n_multilang
|
||||
- account_edi_ubl_cii
|
||||
- base_iban
|
||||
- l10n_din5008
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: Switzerland - Accounting
|
||||
- **Version**: 11.2
|
||||
- **Category**: Accounting/Localizations/Account Charts
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_ch`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/l10n_ch
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -5,27 +5,19 @@ from . import models
|
|||
from . import report
|
||||
from . import wizard
|
||||
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def load_translations(env):
|
||||
env.ref('l10n_ch.l10nch_chart_template').process_coa_translations()
|
||||
|
||||
|
||||
def init_settings(env):
|
||||
'''If the company is localized in Switzerland, activate the cash rounding by default.
|
||||
'''
|
||||
# The cash rounding is activated by default only if the company is localized in Switzerland or Liechtenstein.
|
||||
for company in env['res.company'].search([('partner_id.country_id.code', 'in', ["CH", "LI"])]):
|
||||
res_config_id = env['res.config.settings'].create({
|
||||
config_wizard = env['res.config.settings'].create({
|
||||
'company_id': company.id,
|
||||
'group_cash_rounding': True
|
||||
})
|
||||
# We need to call execute, otherwise the "implied_group" in fields are not processed.
|
||||
res_config_id.execute()
|
||||
config_wizard.execute()
|
||||
config_wizard.unlink()
|
||||
|
||||
|
||||
def post_init(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
load_translations(env)
|
||||
def post_init(env):
|
||||
init_settings(env)
|
||||
|
|
|
|||
|
|
@ -1,22 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
# Main contributor: Nicolas Bessi. Camptocamp SA
|
||||
# Financial contributors: Hasa SA, Open Net SA,
|
||||
# Prisme Solutions Informatique SA, Quod SA
|
||||
# Translation contributors: brain-tec AG, Agile Business Group
|
||||
{
|
||||
'name': "Switzerland - Accounting",
|
||||
'name': 'Switzerland - Accounting',
|
||||
'website': 'https://www.odoo.com/documentation/latest/applications/finance/fiscal_localizations/switzerland.html',
|
||||
'icon': '/account/static/description/l10n.png',
|
||||
'countries': ['ch'],
|
||||
'description': """
|
||||
Swiss localization
|
||||
==================
|
||||
This module defines a chart of account for Switzerland (Swiss PME/KMU 2015), taxes and enables the generation of ISR and QR-bill when you print an invoice or send it by mail.
|
||||
|
||||
An ISR will be generated if you specify the information it needs :
|
||||
- The bank account you expect to be paid on must be set, and have a valid postal reference.
|
||||
- Your invoice must have been set assigned a bank account to receive its payment
|
||||
(this can be done manually, but a default value is automatically set if you have defined a bank account).
|
||||
- You must have set the postal references of your bank.
|
||||
- Your invoice must be in EUR or CHF (as ISRs do not accept other currencies)
|
||||
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
|
||||
|
|
@ -24,39 +16,28 @@ A QR-bill will be generated if:
|
|||
- 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 ISR and QR-bill is automatic if you meet the previous criteria.
|
||||
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.
|
||||
|
||||
Here is how it works:
|
||||
- Printing the invoice will trigger the download of three files: the invoice, its ISR and its QR-bill
|
||||
- Clicking the 'Send by mail' button will attach three files to your draft mail : the invoice, the ISR and the QR-bill.
|
||||
""",
|
||||
'version': '11.2',
|
||||
'version': '11.3',
|
||||
'category': 'Accounting/Localizations/Account Charts',
|
||||
|
||||
'depends': ['account', 'l10n_multilang', 'base_iban', 'l10n_din5008'],
|
||||
|
||||
'depends': [
|
||||
'account',
|
||||
'account_edi_ubl_cii',
|
||||
'base_iban',
|
||||
'l10n_din5008',
|
||||
],
|
||||
'auto_install': ['account'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'data/l10n_ch_chart_data.xml',
|
||||
'data/account.account.template.csv',
|
||||
'data/l10n_ch_chart_post_data.xml',
|
||||
'data/account_tax_group_data.xml',
|
||||
'data/account_tax_report_data.xml',
|
||||
'data/account_vat2011_data.xml',
|
||||
'data/account_tax_template_data_2024.xml',
|
||||
'data/account_fiscal_position_data.xml',
|
||||
'data/account_fiscal_position_data_2024.xml',
|
||||
'data/account_chart_template_data.xml',
|
||||
'report/isr_report.xml',
|
||||
'report/swissqr_report.xml',
|
||||
'views/res_bank_view.xml',
|
||||
'views/account_invoice_view.xml',
|
||||
'views/account_invoice.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/setup_wizard_views.xml',
|
||||
'views/qr_invoice_wizard_view.xml'
|
||||
'views/qr_invoice_wizard_view.xml',
|
||||
'views/account_payment_view.xml',
|
||||
],
|
||||
|
||||
'demo': [
|
||||
'demo/account_cash_rounding.xml',
|
||||
'demo/demo_company.xml',
|
||||
|
|
@ -67,6 +48,8 @@ Here is how it works:
|
|||
'web.report_assets_common': [
|
||||
'l10n_ch/static/src/scss/**/*',
|
||||
],
|
||||
},
|
||||
}
|
||||
,
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,171 +0,0 @@
|
|||
"id","name","code","account_type","chart_template_id/id","reconcile"
|
||||
"ch_coa_1060","Securities (with stock exchange price)","1060","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1069","Accumulated depreciation on securities","1069","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1091","Transfer account: Salaries","1091","asset_current","l10n_ch.l10nch_chart_template","True"
|
||||
"ch_coa_1099","Transfer account: miscellaneous","1099","asset_current","l10n_ch.l10nch_chart_template","True"
|
||||
"ch_coa_1100","Accounts receivable from goods and services (Debtors)","1100","asset_receivable","l10n_ch.l10nch_chart_template","True"
|
||||
"ch_coa_1101","Receivable (PoS)","1101","asset_receivable","l10n_ch.l10nch_chart_template","True"
|
||||
"ch_coa_1109","Del credere (Acc. depr. on debtors)","1109","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1140","Advances and loans","1140","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1149","Advances and loans adjustments","1149","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1170","Input Tax (VAT) receivable on material, goods, services, energy","1170","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1171","Input Tax (VAT) receivable on investments, other operating expenses","1171","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1176","Withholding Tax (WT) receivable","1176","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1180","Receivables from social insurances and social security institutions","1180","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1189","Withholding tax","1189","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1190","Other short-term receivables","1190","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1199","Accumulated depreciation on short-terms receivables","1199","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1200","Goods / Merchandise (Trade)","1200","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1207","Accumulated depreciation on Goods / Merchandise (Trade)","1207","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1208","Downpayment on Goods / Merchandise (Trade)","1208","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1209","Correction on Goods / Merchandise (Trade)","1209","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1210","Raw materials","1210","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1217","Accumulated depreciation on raw material","1217","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1218","Downpayment on raw material","1218","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1219","Correction on raw material","1219","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1220","Auxiliary material","1220","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1230","Consumables","1230","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1250","Consignments Goods ","1250","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1260","Finished products","1260","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1267","Accumulated depreciation on Finished products","1267","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1269","Correction on Finished products","1269","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1270","Products in process / Unfinished products","1270","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1277","Accumulated depreciation on Products in process / Unfinished products","1277","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1279","Correction on Products in process / Unfinished products","1279","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1280","Work in progress","1280","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1287","Accumulated depreciation on work in progress","1287","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1289","Correction on work in progress","1289","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1300","Accrued revenue and deferred expense (Accounts paid in advance)","1300","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1301","Deferred expense (Accounts paid in advance)","1301","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1400","Long-term securities","1400","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1409","Accumulated depreciation on long-term securities","1409","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1440","Loan (Asset)","1440","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1441","Mortgages","1441","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1449","Accumulated depreciation on long term receivables","1449","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1480","Participations","1480","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1489","Accumulated depreciation on participations","1489","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1500","Machinery","1500","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1509","Accumulated depreciation on machinery","1509","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1510","Equipment","1510","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1519","Accumulated depreciation on equipment","1519","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1520","Office Equipment (including Information & Communication Technology)","1520","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1529","Accumulated depreciation on office equipment (incl. ICT)","1529","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1530","Vehicles","1530","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1539","Accumulated depreciation on vehicles","1539","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1540","Tools","1540","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1549","Accumulated depreciation on tools","1549","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1550","Warehouse","1550","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1559","Accumulated depreciation on warehouse","1559","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1570","Equipments and Facilities","1570","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1579","Accumulated depreciation on Equipments and Facilities","1579","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1590","Other movable tangible assets","1590","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1599","Accumulated depreciation on Other movable tangible assets","1599","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1600","Real Estate","1600","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1609","Accumulated depreciation on real estate","1609","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1700","Patents, Licences","1700","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1709","Accumulated depreciation on Patents, Licences","1709","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1770","Goodwill","1770","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1779","Accumulated depreciation on goodwill","1779","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_1850","Non-paid-in share capital","1850","asset_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2000","Accounts payable from goods and services (Creditors)","2000","liability_payable","l10n_ch.l10nch_chart_template","True"
|
||||
"ch_coa_2030","Prepayments received","2030","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2100","Bank Overdraft (Bank)","2100","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2120","Leasing bondings","2120","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2140","Other interest-bearing short terms liabilities","2140","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2160","Dettes envers l'actionnaire","2160","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2200","Sales Tax (VAT) owed","2200","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2201","VAT payable","2201","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2206","Withholding Tax (WT) owed","2206","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2208","Direct Taxes","2208","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2210","Others short term liabilities","2210","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2261","Dividend payouts resolved (Dividends)","2261","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2270","Social insurances owed","2270","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2279","Withholding taxes","2279","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2300","Deferred revenue and accrued expenses (Accounts received in advance)","2300","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2301","Deferred revenue (Accounts Received in Advance)","2301","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2330","Short-term provisions","2330","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2400","Bank debts","2400","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2420","Finance lease commitments","2420","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2430","Debentures","2430","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2450","Loans","2450","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2451","Mortgages","2451","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2500","Other long term liabilities","2500","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2600","Long-term provisions","2600","liability_current","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2800","Share capital","2800","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2900","Legal capital reserves","2900","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2940","Valuation Reserves","2940","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2950","Legal retained earnings (Reserves)","2950","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2960","Voluntary retained earnings","2960","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2970","Profits brought forward / Losses brought forward","2970","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2979","Annual profit or annual loss","2979","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_2980","Treasury stock, shares, participation rights (negative item) ","2980","equity","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3000","Sales of products (Manufacturing)","3000","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3009","Deductions on sales","3009","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3200","Sales of goods (Trade)","3200","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3400","Revenues from services","3400","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3600","Other revenues","3600","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3700","Own services","3700","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3710","Own consumption","3710","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3800","Financial discount","3800","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3801","Discounts and price reduction","3801","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3802","Rebates","3802","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3803","Third-party commissions","3803","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3804","Collection fees","3804","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3805","Losses from bad debts","3805","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3806","Exchange rate differences","3806","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3807","Shipping & Returns","3807","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3900","Changes in inventories of unfinished and finished products","3900","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3901","Change in inventories of finished goods","3901","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_3940","Change in the value of unbilled services","3940","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4000","Cost of raw materials (Manufacturing)","4000","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4008","Inventory changes","4008","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4009","Deductions obtained on purchases","4009","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4070","Purchase Loans","4070","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4071","Customs duties on importation","4071","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4072","Transport costs at purchase","4072","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4080","Inventory changes","4080","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4086","Loss of material","4086","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4200","Cost of materials (Trade)","4200","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4400","Cost of purchased services","4400","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4500","Electricity","4500","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4510","Gas","4510","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4520","Fuel oil","4520","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4521","Coal, briquettes, wood","4521","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4530","Petrol","4530","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4540","Water","4540","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4800","Change in inventories of goods","4800","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4801","Change in raw material inventories","4801","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4900","Financial Discounts","4900","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4901","Discounts and price reductions","4901","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4991","Cash Difference Loss","4991","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4992","Cash Difference Gain","4992","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4092","Rebates","4902","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4903","Commissions on purchases","4903","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_4906","Exchange rate differences","4906","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_5000","Wages and salaries","5000","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_5700","Social benefits","5700","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_5800","Other staff cost","5800","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_5900","Temporary staff expenditures","5900","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6000","Rent","6000","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6100","Maintenance & repair expenses","6100","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6105","Leasing movable tangible fixed assets","6105","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6200","Vehicle expenses","6200","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6260","Vehicules leasing and renting","6260","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6300","Insurance premiums","6300","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6400","Energy expenses & disposal expenses","6400","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6500","Administration expenses","6500","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6570","IT leasing","6570","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6600","Promotion and advertising expenses","6600","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6700","Other operating expenses","6700","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6800","Depreciations","6800","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6900","Financial expenses (Interest expenses, Securities expenses, Participations expenses)","6900","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_6950","Financial revenues (Interest revenues, Securities revenues, Participations revenues)","6950","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_7000","Non-core business revenues","7000","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_7010","Non-core business expenses","7010","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_7500","Revenues from operational real estate","7500","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_7510","Expenses from operational real estate","7510","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_8000","Non-operational expenses","8000","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_8100","Non-operational revenues","8100","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_8500","Extraordinary expenses","8500","expense","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_8510","Extraordinary revenues","8510","income","l10n_ch.l10nch_chart_template","False"
|
||||
"ch_coa_8900","Direct Taxes","8900","expense","l10n_ch.l10nch_chart_template","False"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<function model="account.chart.template" name="try_loading">
|
||||
<value eval="[ref('l10n_ch.l10nch_chart_template')]"/>
|
||||
</function>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Fiscal Position Templates -->
|
||||
<record id="fiscal_position_template_1" model="account.fiscal.position.template">
|
||||
<field name="name">Suisse national (+Liechtenstein)</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="country_group_id" ref="base.ch_and_li"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_template_import" model="account.fiscal.position.template">
|
||||
<field name="sequence">1</field>
|
||||
<field name="name">Import/Export</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
</record>
|
||||
|
||||
<!-- Fiscal Position Tax Templates (pre-2024 rates change) -->
|
||||
<record id="fiscal_position_tax_template_3" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_25_purchase" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
<record id="fiscal_position_tax_template_4" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_25_invest" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_5" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_37_purchase" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
<record id="fiscal_position_tax_template_6" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_37_invest" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
|
||||
|
||||
<record id="fiscal_position_tax_template_9" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_77_purchase_reverse" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
<record id="fiscal_position_tax_template_10" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_77_invest" />
|
||||
<field name="tax_dest_id" ref="vat_O_import" />
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_14" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_25" />
|
||||
<field name="tax_dest_id" ref="vat_XO" />
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_15" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_37" />
|
||||
<field name="tax_dest_id" ref="vat_XO" />
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_17" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import" />
|
||||
<field name="tax_src_id" ref="vat_77" />
|
||||
<field name="tax_dest_id" ref="vat_XO" />
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Fiscal Position Tax Templates (post-2024 rates change) -->
|
||||
<record id="fiscal_position_tax_template_1_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_26"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_2_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_26_invest"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_3_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_38"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_4_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_38_invest"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_5_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_81_reverse"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_6_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_purchase_81_invest"/>
|
||||
<field name="tax_dest_id" ref="vat_O_import"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_7_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_sale_26"/>
|
||||
<field name="tax_dest_id" ref="vat_XO"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_8_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_sale_38"/>
|
||||
<field name="tax_dest_id" ref="vat_XO"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_tax_template_9_2024" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_template_import"/>
|
||||
<field name="tax_src_id" ref="vat_sale_81"/>
|
||||
<field name="tax_dest_id" ref="vat_XO"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Account Tax Group (pre-2024 rates change) -->
|
||||
<record id="tax_group_tva_0" model="account.tax.group">
|
||||
<field name="name">VAT 0%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_tva_25" model="account.tax.group">
|
||||
<field name="name">VAT 2.5%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_tva_37" model="account.tax.group">
|
||||
<field name="name">VAT 3.7%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_tva_77" model="account.tax.group">
|
||||
<field name="name">VAT 7.7%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_tva_100" model="account.tax.group">
|
||||
<field name="name">VAT 100%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<!-- Account Tax Group (post-2024 rates change) -->
|
||||
<record id="tax_group_vat_26" model="account.tax.group">
|
||||
<field name="name">VAT 2.6%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_vat_38" model="account.tax.group">
|
||||
<field name="name">VAT 3.8%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
<record id="tax_group_vat_81" model="account.tax.group">
|
||||
<field name="name">VAT 8.1%</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<odoo auto_sequence="1">
|
||||
<record id="tax_report" model="account.report">
|
||||
<field name="name">Tax Report</field>
|
||||
<field name="root_report_id" ref="account.generic_tax_report"/>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
<field name="filter_fiscal_position" eval="True"/>
|
||||
<field name="allow_foreign_vat" eval="True"/>
|
||||
<field name="availability_condition">country</field>
|
||||
<field name="column_ids">
|
||||
<record id="tax_report_balance" model="account.report.column">
|
||||
|
|
@ -15,18 +15,28 @@
|
|||
<field name="line_ids">
|
||||
<record id="account_tax_report_line_chiffre_af" model="account.report.line">
|
||||
<field name="name">I. TURNOVER</field>
|
||||
<field name="sequence" eval="0"/> <!-- Sequence is force to avoid order problem when updating within the same version. -->
|
||||
<field name="name@fr">I. CHIFFRE D'AFFAIRES</field>
|
||||
<field name="name@it">I. CIFRA D’AFFARI</field>
|
||||
<field name="name@de">I. UMSATZ</field>
|
||||
<field name="name@fr_BE">I. CHIFFRE D'AFFAIRES</field>
|
||||
<field name="hierarchy_level">0</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_200" model="account.report.line">
|
||||
<field name="name">200 - Total amount of agreed or collected consideration incl. from supplies opted for taxation, transfer of supplies acc. to the notification procedure and supplies provided abroad (worldwide turnover)</field>
|
||||
<field name="name@fr">200 - Total des contre-prestations convenues ou reçues, y c. de prestations imposées par option, de transferts par procédure de déclaration, de prestations à l’étranger</field>
|
||||
<field name="name@it">200 - Totale delle controprestazioni convenute o ricevute, incluse quelle inerenti a prestazioni optate, a trasferimenti mediante procedura di notifica e a prestazioni all’estero</field>
|
||||
<field name="name@de">200 - Total der vereinbarten bzw. vereinnahmten Entgelte, inkl. optierte Leistungen im Ausland</field>
|
||||
<field name="name@fr_BE">200 - Total des contre-prestations convenues ou reçues, y c. de prestations imposées par option, de transferts par procédure de déclaration, de prestations à l’étranger</field>
|
||||
<field name="code">tax_ch_200</field>
|
||||
<field name="aggregation_formula">tax_ch_302a.balance + tax_ch_303a.balance + tax_ch_312a.balance + tax_ch_313a.balance + tax_ch_342a.balance + tax_ch_343a.balance + tax_ch_205.balance + tax_ch_289.balance</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_205" model="account.report.line">
|
||||
<field name="name">205 - Consideration reported in Ref. 200 from supplies exempt from the tax without credit (art. 21) where the option for their taxation according to art. 22 has been exercised</field>
|
||||
<field name="name@fr">205 - Contre-prestations déclarées sous ch. 200 qui proviennent de prestations exclues du champ de l’impôt (art. 21) pour lesquelles il a été opté en vertu de l’art. 22</field>
|
||||
<field name="name@it">205 - Controprestazioni contenute nella cifra 200 conseguite con prestazioni escluse dall’imposta (art. 21) per la cui imposizione si è optato in virtù dell’art. 22</field>
|
||||
<field name="name@de">205 - In Ziffer 200 enthaltene Entgelte aus von der Steuer ausgenommenen Leistungen (Art. 21), für welche nach Art. 22 optiert wird</field>
|
||||
<field name="name@fr_BE">205 - Contre-prestations déclarées sous ch. 200 qui proviennent de prestations exclues du champ de l’impôt (art. 21) pour lesquelles il a été opté en vertu de l’art. 22</field>
|
||||
<field name="code">tax_ch_205</field>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_205_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -35,34 +45,43 @@
|
|||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_220_289" model="account.report.line"> <!-- FIXME in master: the xml is as it is for historical reasons but it does represent box 220 only -->
|
||||
<record id="account_tax_report_line_chtax_220_289" model="account.report.line"> <!-- the xml is as it is for historical reasons but it does represent box 220 only -->
|
||||
<field name="name">220 - Supplies exempt from the tax (e.g. export, art. 23) and supplies provided to institutional and individual beneficiaries that are exempt from liability for tax (art. 107 para. 1 lit. a)</field>
|
||||
<field name="name@fr">220 - Prestations exonérées (p. ex. exportations, art. 23), prestations exonérées fournies à des institutions et à des personnes bénéficiaires (art. 107, al. 1, let. a)</field>
|
||||
<field name="name@it">220 - Prestazioni esenti dall’imposta (p. es. esportazioni; art. 23), prestazioni esenti a beneficiari istituzionali e persone beneficiarie (art. 107 cpv. 1 lett. a)</field>
|
||||
<field name="name@de">220 - Von der Steuer befreite Leistungen (u.a. Exporte, Art. 23), von der Steuer befreite Leistungen an begünstigte Einrichtungen und Personen (Art. 107 Abs. 1 Bst. a)</field>
|
||||
<field name="name@fr_BE">220 - Prestations exonérées (p. ex. exportations, art. 23), prestations exonérées fournies à des institutions et à des personnes bénéficiaires (art. 107, al. 1, let. a)</field>
|
||||
<field name="code">tax_ch_220</field>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_220_289_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">220</field>
|
||||
<field name="formula">-220</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_221" model="account.report.line">
|
||||
<field name="name">221 - Supplies provided abroad</field>
|
||||
<field name="name@fr">221 - Prestations fournies à l’étranger</field>
|
||||
<field name="name@it">221 - Prestazioni all’estero</field>
|
||||
<field name="name@de">221 - Leistungen im Ausland</field>
|
||||
<field name="name@fr_BE">221 - Prestations fournies à l’étranger</field>
|
||||
<field name="code">tax_ch_221</field>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_221_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">221</field>
|
||||
<field name="formula">-221</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_225" model="account.report.line">
|
||||
<field name="name">225 - Transfer of supplies according to the notification procedure (art. 38, please submit Form 764)</field>
|
||||
<field name="name@fr">225 - Transferts avec la procédure de déclaration (art. 38)</field>
|
||||
<field name="name@it">225 - Trasferimenti mediante procedura di notifica (art. 38)</field>
|
||||
<field name="name@de">225 - Übertragung im Meldeverfahren (Art. 38)</field>
|
||||
<field name="name@fr_BE">225 - Transferts avec la procédure de déclaration (art. 38)</field>
|
||||
<field name="code">tax_ch_225</field>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_225_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -73,20 +92,26 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_230" model="account.report.line">
|
||||
<field name="name">230 - Supplies provided on Swiss territory exempt from the tax without credit (art. 21) and where the option for their taxation according to art. 22 has not been exercised</field>
|
||||
<field name="name@fr">230 - Prestations exclues du champ de l’impôt (art. 21) fournies sur le territoire suisse pour lesquelles il n’a pas été opté selon l’art. 22</field>
|
||||
<field name="name@it">230 - Prestazioni escluse dall’imposta (art. 21) effettuate in territorio svizzero per la cui imposizione non si è optato in virtù dell’art. 22</field>
|
||||
<field name="name@de">230 - Von der Steuer ausgenommene Inlandleistungen (Art. 21), für die nicht nach Art. 22 optiert wird</field>
|
||||
<field name="name@fr_BE">230 - Prestations exclues du champ de l’impôt (art. 21) fournies sur le territoire suisse pour lesquelles il n’a pas été opté selon l’art. 22</field>
|
||||
<field name="code">tax_ch_230</field>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_230_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">230</field>
|
||||
<field name="formula">-230</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_235" model="account.report.line">
|
||||
<field name="name">235 - Reduction of consideration (discounts, rebates etc.)</field>
|
||||
<field name="name@fr">235 - Diminutions de la contre-prestation telles que rabais, escomptes, etc.</field>
|
||||
<field name="name@it">235 - Diminuzioni della controprestazione quali sconti, ribassi, ecc.</field>
|
||||
<field name="name@de">235 - Entgeltsminderungen wie Skonti, Rabatte usw.</field>
|
||||
<field name="name@fr_BE">235 - Diminutions de la contre-prestation telles que rabais, escomptes, etc.</field>
|
||||
<field name="code">tax_ch_235</field>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_235_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -97,8 +122,11 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_280" model="account.report.line">
|
||||
<field name="name">280 - Miscellaneous (e.g. land value, purchase prices in case of margin taxation)</field>
|
||||
<field name="name@fr">280 - Divers (p.ex. valeur du terrain)</field>
|
||||
<field name="name@it">280 - Diversi (ad.es. valore del terreno, prezzo d’acquisto in caso d’imposizione dei margini)</field>
|
||||
<field name="name@de">280 - Diverses (z.B. Wert des Bodens, Ankaufspreise Margenbesteuerung)</field>
|
||||
<field name="name@fr_BE">280 - Divers (p.ex. valeur du terrain)</field>
|
||||
<field name="code">tax_ch_280</field>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_280_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -109,65 +137,86 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_289" model="account.report.line">
|
||||
<field name="name">289 - Deductions (Total Ref. 220 to 280)</field>
|
||||
<field name="name@fr">289 - Déductions (Total ch. 220 à 280)</field>
|
||||
<field name="name@it">289 - Deduzioni (Totale cifre 220-280)</field>
|
||||
<field name="name@de">289 - Abzüge (Total Ziff. 220 bis 280)</field>
|
||||
<field name="name@fr_BE">289 - Déductions (Total ch. 220 à 280)</field>
|
||||
<field name="code">tax_ch_289</field>
|
||||
<field name="aggregation_formula">tax_ch_220.balance + tax_ch_221.balance + tax_ch_225.balance + tax_ch_230.balance + tax_ch_235.balance + tax_ch_280.balance</field>
|
||||
<field name="sequence" eval="9"/>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_299" model="account.report.line">
|
||||
<field name="name">299 - Taxable turnover (Ref. 200 minus Ref. 289)</field>
|
||||
<field name="name@fr">299 - Total du chiffre d’affaires imposable (ch. 200 moins ch. 289)</field>
|
||||
<field name="name@it">299 - Cifra d’affari imponibile complessiva (cifra 200, dedotta la cifra 289)</field>
|
||||
<field name="name@de">299 - Steuerbarer Gesamtumsatz (Ziff. 200 abzüglich Ziff. 289)</field>
|
||||
<field name="name@fr_BE">299 - Total du chiffre d’affaires imposable (ch. 200 moins ch. 289)</field>
|
||||
<field name="aggregation_formula">tax_ch_200.balance - tax_ch_289.balance</field>
|
||||
<field name="sequence" eval="10"/>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_calc_impot" model="account.report.line">
|
||||
<field name="name">II - TAX CALCULATION</field>
|
||||
<field name="sequence" eval="11"/>
|
||||
<field name="name">II. TAX CALCULATION</field>
|
||||
<field name="hierarchy_level">0</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_supplies_1" model="account.report.line">
|
||||
<field name="name">Supplies CHF from 01.01.2024</field>
|
||||
<field name="sequence" eval="12"/>
|
||||
<field name="name@fr">Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="name@it">Prestazioni CHF dal 01.01.2024</field>
|
||||
<field name="name@de">Leistungen CHF ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_303a" model="account.report.line">
|
||||
<field name="name">303a - Standard rate (8,1%): Supplies CHF from 01.01.2024</field>
|
||||
<field name="name@fr">303a - Taux normal (8,1%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="name@it">303a - Aliquota normale (8,1%): Prestazioni CHF fino dal 01.01.2024</field>
|
||||
<field name="name@de">303a - Normalsatz (8.1%): Leistungen CHF ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">303a - Taux normal (8,1%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_303a</field>
|
||||
<field name="sequence" eval="13"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_303a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">303a</field>
|
||||
<field name="formula">-303a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_313a" model="account.report.line">
|
||||
<field name="name">313a - Reduced rate (2,6%): Supplies CHF from 01.01.2024</field>
|
||||
<field name="name@fr">313a - Taux réduit (2,6%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="name@it">313a - Aliquota ridotta (2,6%): Prestazioni CHF fino dal 01.01.2024</field>
|
||||
<field name="name@de">313a - Reduzierter Satz (2.6%): Leistungen CHF ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">313a - Taux réduit (2,6%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_313a</field>
|
||||
<field name="sequence" eval="14"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_313a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">313a</field>
|
||||
<field name="formula">-313a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_343a" model="account.report.line">
|
||||
<field name="name">343a - Accommodation rate (3,8%): Supplies CHF from 01.01.2024</field>
|
||||
<field name="name@fr">343a - Taux spécial pour l'hébergement (3,8%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="name@it">343a - Aliquota speciale per l’alloggio (3,8%): Prestazioni CHF fino dal 01.01.2024</field>
|
||||
<field name="name@de">343a - Beherbergungssatz (3.8%): Leistungen CHF ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">343a - Taux spécial pour l'hébergement (3,8%): Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_343a</field>
|
||||
<field name="sequence" eval="15"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_343a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">343a</field>
|
||||
<field name="formula">-343a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_383a" model="account.report.line">
|
||||
<field name="name">383a - Acquisition tax: Supplies CHF from 01.01.2024</field>
|
||||
<field name="name@fr">383a - Impôt sur les acquisitions: Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="name@it">383a - Imposta sull’acquisto: Prestazioni CHF fino dal 01.01.2024</field>
|
||||
<field name="name@de">383a - Bezugsteuersatz: Leistungen CHF ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">383a - Impôt sur les acquisitions: Prestations CHF dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_383a</field>
|
||||
<field name="sequence" eval="16"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_383a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -180,48 +229,63 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_supplies_2" model="account.report.line">
|
||||
<field name="name">Supplies CHF to 31.12.2023</field>
|
||||
<field name="sequence" eval="17"/>
|
||||
<field name="name@fr">Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">Prestazioni CHF fino al 31.12.2023</field>
|
||||
<field name="name@de">Leistungen CHF bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_302a" model="account.report.line">
|
||||
<field name="name">302a - Standard rate (7,7%): Supplies CHF to 31.12.2023</field>
|
||||
<field name="name@fr">302a - Taux normal (7,7%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">302a - Aliquota normale (7,7%): Prestazioni CHF fino al 31.12.2023</field>
|
||||
<field name="name@de">302a - Normalsatz (7.7%): Leistungen CHF bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">302a - Taux normal (7,7%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_302a</field>
|
||||
<field name="sequence" eval="18"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_302a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">302a</field>
|
||||
<field name="formula">-302a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_312a" model="account.report.line">
|
||||
<field name="name">312a - Reduced rate (2,5%): Supplies CHF to 31.12.2023</field>
|
||||
<field name="name@fr">312a - Taux réduit (2,5%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">312a - Aliquota ridotta (2,5%): Prestazioni CHF fino al 31.12.2023</field>
|
||||
<field name="name@de">312a - Reduzierter Satz (2.5%): Leistungen CHF bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">312a - Taux réduit (2,5%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_312a</field>
|
||||
<field name="sequence" eval="19"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_312a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">312a</field>
|
||||
<field name="formula">-312a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_342a" model="account.report.line">
|
||||
<field name="name">342a - Accommodation rate (3,7%): Supplies CHF to 31.12.2023</field>
|
||||
<field name="name@fr">342a - Taux spécial pour l'hébergement (3,7%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">342a - Aliquota speciale per l’alloggio (3,7%): Prestazioni CHF fino al 31.12.2023</field>
|
||||
<field name="name@de">342a - Beherbergungssatz (3.7%): Leistungen CHF bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">342a - Taux spécial pour l'hébergement (3,7%): Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_342a</field>
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_342a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">342a</field>
|
||||
<field name="formula">-342a</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_382a" model="account.report.line">
|
||||
<field name="name">382a - Acquisition tax: Supplies CHF to 31.12.2023</field>
|
||||
<field name="name@fr">382a - Impôt sur les acquisitions: Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">382a - Imposta sull’acquisto: Prestazioni CHF fino al 31.12.2023</field>
|
||||
<field name="name@de">382a - Bezugsteuersatz: Leistungen CHF bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">382a - Impôt sur les acquisitions: Prestations CHF jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_382a</field>
|
||||
<field name="sequence" eval="21"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_382a_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -234,53 +298,68 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_tax_amount_1" model="account.report.line">
|
||||
<field name="name">Tax amount CHF / cent. from 01.01.2024</field>
|
||||
<field name="sequence" eval="22"/>
|
||||
<field name="name@fr">Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="name@it">Imposta CHF / cts. dal 01.01.2024</field>
|
||||
<field name="name@de">Steuer CHF / Rp. ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_303b" model="account.report.line">
|
||||
<field name="name">303b - Standard rate (8,1%): Tax amount CHF / cent. from 01.01.2024</field>
|
||||
<field name="name@fr">303b - Taux normal (8,1%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="name@it">303b - Aliquota normale (8,1%): Imposta CHF / cts. fino dal 01.01.2024</field>
|
||||
<field name="name@de">303b - Normalsatz (8.1%): Steuer CHF / Rp. ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">303b - Taux normal (8,1%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_303b</field>
|
||||
<field name="sequence" eval="23"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_303b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">303b</field>
|
||||
<field name="formula">-303b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_313b" model="account.report.line">
|
||||
<field name="name">313b - Reduced rate (2,6%): Tax amount CHF / cent. from 01.01.2024</field>
|
||||
<field name="name@fr">313b - Taux réduit (2,6%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="name@it">313b - Aliquota ridotta (2,6%): Imposta CHF / cts. fino dal 01.01.2024</field>
|
||||
<field name="name@de">313b - Reduzierter Satz (2.6%): Steuer CHF / Rp. ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">313b - Taux réduit (2,6%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_313b</field>
|
||||
<field name="sequence" eval="24"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_313b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">313b</field>
|
||||
<field name="formula">-313b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_343b" model="account.report.line">
|
||||
<field name="name">343b - Accommodation rate (3,8%): Tax amount CHF / cent. from 01.01.2024</field>
|
||||
<field name="name@fr">343b - Taux spécial pour l'hébergement (3,8%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="name@it">343b - Aliquota speciale per l’alloggio (3,8%): Imposta CHF / cts. fino dal 01.01.2024</field>
|
||||
<field name="name@de">343b - Beherbergungssatz (3.8%): Steuer CHF / Rp. ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">343b - Taux spécial pour l'hébergement (3,8%): Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_343b</field>
|
||||
<field name="sequence" eval="25"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_343b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">343b</field>
|
||||
<field name="formula">-343b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_383b" model="account.report.line">
|
||||
<field name="name">383b - Acquisition tax: Tax amount CHF / cent. from 01.01.2024</field>
|
||||
<field name="name@fr">383b - Impôt sur les acquisitions: Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="name@it">383b - Imposta sull’acquisto: Imposta CHF / cts. fino dal 01.01.2024</field>
|
||||
<field name="name@de">383b - Bezugsteuersatz: Steuer CHF / Rp. ab 01.01.2024</field>
|
||||
<field name="name@fr_BE">383b - Impôt sur les acquisitions: Impôt CHF / ct. dès le 01.01.2024</field>
|
||||
<field name="code">tax_ch_383b</field>
|
||||
<field name="sequence" eval="26"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_383b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">383b</field>
|
||||
<field name="formula">-383b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -288,53 +367,68 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_tax_amount_2" model="account.report.line">
|
||||
<field name="name">Tax amount CHF / cent. to 31.12.2023</field>
|
||||
<field name="sequence" eval="27"/>
|
||||
<field name="name@fr">Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">Imposta CHF / cts. fino al 31.12.2023</field>
|
||||
<field name="name@de">Steuer CHF / Rp. bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_302b" model="account.report.line">
|
||||
<field name="name">302b - Standard rate (7,7%): Tax amount CHF / cent. to 31.12.2023</field>
|
||||
<field name="name@fr">302b - Taux normal (7,7%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">302b - Aliquota normale (7,7%): Imposta CHF / cts. fino al 31.12.2023</field>
|
||||
<field name="name@de">302b - Normalsatz (7.7%): Steuer CHF / Rp. bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">302b - Taux normal (7,7%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_302b</field>
|
||||
<field name="sequence" eval="28"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_302b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">302b</field>
|
||||
<field name="formula">-302b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_312b" model="account.report.line">
|
||||
<field name="name">312b - Reduced rate (2,5%): Tax amount CHF / cent. to 31.12.2023</field>
|
||||
<field name="name@fr">312b - Taux réduit (2,5%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">312b - Aliquota ridotta (2,5%): Imposta CHF / cts. fino al 31.12.2023</field>
|
||||
<field name="name@de">312b - Reduzierter Satz (2.5%): Steuer CHF / Rp. bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">312b - Taux réduit (2,5%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_312b</field>
|
||||
<field name="sequence" eval="29"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_312b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">312b</field>
|
||||
<field name="formula">-312b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_342b" model="account.report.line">
|
||||
<field name="name">342b - Accommodation rate (3,7%): Tax amount CHF / cent. to 31.12.2023</field>
|
||||
<field name="name@fr">342b - Taux spécial pour l'hébergement (3,7%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">342b - Aliquota speciale per l’alloggio (3,7%): Imposta CHF / cts. fino al 31.12.2023</field>
|
||||
<field name="name@de">342b - Beherbergungssatz (3.7%): Steuer CHF / Rp. bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">342b - Taux spécial pour l'hébergement (3,7%): Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_342b</field>
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_342b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">342b</field>
|
||||
<field name="formula">-342b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_382b" model="account.report.line">
|
||||
<field name="name">382b - Acquisition tax: Tax amount CHF / cent. to 31.12.2023</field>
|
||||
<field name="name@fr">382b - Impôt sur les acquisitions: Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="name@it">382b - Imposta sull’acquisto: Imposta CHF / cts. fino al 31.12.2023</field>
|
||||
<field name="name@de">382b - Bezugsteuersatz: Steuer CHF / Rp. bis 31.12.2023</field>
|
||||
<field name="name@fr_BE">382b - Impôt sur les acquisitions: Impôt CHF / ct. jusqu'au 31.12.2023</field>
|
||||
<field name="code">tax_ch_382b</field>
|
||||
<field name="sequence" eval="31"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_382b_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">382b</field>
|
||||
<field name="formula">-382b</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -342,14 +436,20 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_399" model="account.report.line">
|
||||
<field name="name">399 - Total amount of tax due</field>
|
||||
<field name="name@fr">399 - Total de l’impôt dû</field>
|
||||
<field name="name@it">399 - Totale dell’imposta dovuta</field>
|
||||
<field name="name@de">399 - Total geschuldete Steuer</field>
|
||||
<field name="name@fr_BE">399 - Total de l’impôt dû</field>
|
||||
<field name="code">tax_ch_399</field>
|
||||
<field name="aggregation_formula">tax_ch_302b.balance + tax_ch_303b.balance + tax_ch_312b.balance + tax_ch_313b.balance + tax_ch_342b.balance + tax_ch_343b.balance + tax_ch_382b.balance + tax_ch_383b.balance</field>
|
||||
<field name="sequence" eval="32"/>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_400" model="account.report.line">
|
||||
<field name="name">400 - Input tax on cost of materials and supplies of services</field>
|
||||
<field name="name@fr">400 - Impôt préalable grevant les coûts en matériel et en prestations de services</field>
|
||||
<field name="name@it">400 - Imposta precedente su costi del materiale e prestazioni di servizi</field>
|
||||
<field name="name@de">400 - Vorsteuer auf Material- und Dienstleistungsaufwand</field>
|
||||
<field name="name@fr_BE">400 - Impôt préalable grevant les coûts en matériel et en prestations de services</field>
|
||||
<field name="code">tax_ch_400</field>
|
||||
<field name="sequence" eval="33"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_400_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -360,8 +460,11 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_405" model="account.report.line">
|
||||
<field name="name">405 - Input tax on investments and other operating costs</field>
|
||||
<field name="name@fr">405 - Impôt préalable grevant les investissements et autres charges d’exploitation</field>
|
||||
<field name="name@it">405 - Imposta precedente su investimenti e altri costi d’esercizio</field>
|
||||
<field name="name@de">405 - Vorsteuer auf Investitionen und übrigem Betriebsaufwand</field>
|
||||
<field name="name@fr_BE">405 - Impôt préalable grevant les investissements et autres charges d’exploitation</field>
|
||||
<field name="code">tax_ch_405</field>
|
||||
<field name="sequence" eval="34"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_405_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -372,8 +475,11 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_410" model="account.report.line">
|
||||
<field name="name">410 - De-taxation (art. 32)</field>
|
||||
<field name="name@fr">410 - Dégrèvement ultérieur de l’impôt préalable (art. 32)</field>
|
||||
<field name="name@it">410 - Sgravio fiscale successivo (art. 32)</field>
|
||||
<field name="name@de">410 - Einlageentsteuerung (Art. 32)</field>
|
||||
<field name="name@fr_BE">410 - Dégrèvement ultérieur de l’impôt préalable (art. 32)</field>
|
||||
<field name="code">tax_ch_410</field>
|
||||
<field name="sequence" eval="35"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_410_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -384,8 +490,11 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_415" model="account.report.line">
|
||||
<field name="name">415 - Correction of the input tax deduction: mixed use (art. 30), own use (art. 31)</field>
|
||||
<field name="name@fr">415 - Corrections de l’impôt préalable: double affectation (art. 30), prestations à soi-même (art. 31)</field>
|
||||
<field name="name@it">415 - Correzioni dell’imposta precedente: doppia utilizzazione (art. 30), consumo proprio (art. 31)</field>
|
||||
<field name="name@de">415 - Vorsteuerkorrekturen: gemischte Verwendung (Art. 30), Eigenverbrauch (Art. 31)</field>
|
||||
<field name="name@fr_BE">415 - Corrections de l’impôt préalable: double affectation (art. 30), prestations à soi-même (art. 31)</field>
|
||||
<field name="code">tax_ch_415</field>
|
||||
<field name="sequence" eval="36"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_415_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -396,8 +505,11 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_420" model="account.report.line">
|
||||
<field name="name">420 - Reduction of the input tax deduction: Flow of funds, which are not deemed to be consideration, such as subsidies, tourist charges (art. 33 para. 2)</field>
|
||||
<field name="name@fr">420 - Réductions de la déduction de l’impôt préalable: prestations n’étant pas considérées comme des contre-prestations, telles subventions, taxes touristiques (art. 33, al. 2)</field>
|
||||
<field name="name@it">420 - Riduzioni della deduzione dell’imposta precedente: non controprestazioni come sussidi, tasse turistiche (art. 33 cpv. 2)</field>
|
||||
<field name="name@de">420 - Vorsteuerkürzungen: Nicht-Entgelte wie Subventionen, Tourismusabgaben (Art. 33 Abs. 2)</field>
|
||||
<field name="name@fr_BE">420 - Réductions de la déduction de l’impôt préalable: prestations n’étant pas considérées comme des contre-prestations, telles subventions, taxes touristiques (art. 33, al. 2)</field>
|
||||
<field name="code">tax_ch_420</field>
|
||||
<field name="sequence" eval="37"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_420_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -408,13 +520,19 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_479" model="account.report.line">
|
||||
<field name="name">479 - Total Ref. 400 to 420</field>
|
||||
<field name="name@fr">479 - Total ch. 400 à 420</field>
|
||||
<field name="name@it">479 - Totale cifre 400-420</field>
|
||||
<field name="name@de">479 - Total Ziff. 400 bis 420</field>
|
||||
<field name="name@fr_BE">479 - Total ch. 400 à 420</field>
|
||||
<field name="code">tax_ch_479</field>
|
||||
<field name="aggregation_formula">tax_ch_400.balance + tax_ch_405.balance + tax_ch_410.balance - tax_ch_415.balance - tax_ch_420.balance</field>
|
||||
<field name="sequence" eval="38"/>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_500" model="account.report.line">
|
||||
<field name="name">500 - Amount payable</field>
|
||||
<field name="sequence" eval="39"/>
|
||||
<field name="name@fr">500 - Montant à payer</field>
|
||||
<field name="name@it">500 - Importo da versare</field>
|
||||
<field name="name@de">500 - Zu bezahlender Betrag</field>
|
||||
<field name="name@fr_BE">500 - Montant à payer</field>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_500_formula" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -426,7 +544,10 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_510" model="account.report.line">
|
||||
<field name="name">510 - Credit in favour of the taxable person</field>
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="name@fr">510 - Solde en faveur de l’assujetti</field>
|
||||
<field name="name@it">510 - Credito del contribuente </field>
|
||||
<field name="name@de">510 - Guthaben der steuerpflichtigen Person</field>
|
||||
<field name="name@fr_BE">510 - Solde en faveur de l’assujetti</field>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_510_formula" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
|
|
@ -440,30 +561,40 @@
|
|||
</record>
|
||||
<record id="account_tax_report_line_chtax_autres_mouv" model="account.report.line">
|
||||
<field name="name">III. OTHER CASH FLOWS</field>
|
||||
<field name="name@fr">III. AUTRES MOUVEMENTS DE FONDS</field>
|
||||
<field name="name@it">III. ALTRI FLUSSI DI MEZZI FINANZIARI</field>
|
||||
<field name="name@de">III. ANDERE MITTELFLÜSSE</field>
|
||||
<field name="name@fr_BE">III. AUTRES MOUVEMENTS DE FONDS</field>
|
||||
<field name="hierarchy_level">0</field>
|
||||
<field name="aggregation_formula">tax_ch_900.balance + tax_ch_910.balance</field>
|
||||
<field name="sequence" eval="41"/>
|
||||
<field name="children_ids">
|
||||
<record id="account_tax_report_line_chtax_900" model="account.report.line">
|
||||
<field name="name">900 - Subsidies, tourist funds collected by tourist offices, contributions from cantonal water, sewage or waste funds (art. 18 para. 2 lit. a to c)</field>
|
||||
<field name="name@fr">900 - Subventions, taxes touristiques perçues par les offices du tourisme, contributions aux établissements d'élimination des déchets et d'approvisionnement en eau</field>
|
||||
<field name="name@it">900 - Sussidi, tasse turistiche incassate da uffici turistici, contributi per lo smaltimento dei rifiuti e le aziende fornitrici d’acqua (lett. a-c)</field>
|
||||
<field name="name@de">900 - Subventionen, durch Kurvereine eingenommene Tourismusabgaben, Entsorgungs- und Wasserwerkbeiträge (Bst. a-c)</field>
|
||||
<field name="name@fr_BE">900 - Subventions, taxes touristiques perçues par les offices du tourisme, contributions aux établissements d'élimination des déchets et d'approvisionnement en eau</field>
|
||||
<field name="code">tax_ch_900</field>
|
||||
<field name="sequence" eval="42"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_900_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">900</field>
|
||||
<field name="formula">-900</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_tax_report_line_chtax_910" model="account.report.line">
|
||||
<field name="name">910 - Donations, dividends, payments of damages etc. (art. 18 para. 2 lit. d to l)</field>
|
||||
<field name="name@fr">910 - Les dons, les dividendes, les dédommagements, etc.</field>
|
||||
<field name="name@it">910 - Doni, dividendi, risarcimenti dei danni ecc. (lett. d-l)</field>
|
||||
<field name="name@de">910 - Spenden, Dividenden, Schadenersatz usw.</field>
|
||||
<field name="name@fr_BE">910 - Les dons, les dividendes, les dédommagements, etc.</field>
|
||||
<field name="code">tax_ch_910</field>
|
||||
<field name="sequence" eval="43"/>
|
||||
<field name="expression_ids">
|
||||
<record id="account_tax_report_line_chtax_910_tag" model="account.report.expression">
|
||||
<field name="label">balance</field>
|
||||
<field name="engine">tax_tags</field>
|
||||
<field name="formula">910</field>
|
||||
<field name="formula">-910</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -1,563 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Account Tax Templates (post-2024 rates change) -->
|
||||
<record model="account.tax.template" id="vat_sale_26">
|
||||
<field name="name">2.6% Sales</field>
|
||||
<field name="description">2.6%</field>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_313a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_313b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_313a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_313b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_sale_26_incl">
|
||||
<field name="name">2.6% Sales (incl.)</field>
|
||||
<field name="description">2.6% incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_313a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_313b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_313a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_313b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_26">
|
||||
<field name="name">2.6% on goods and services</field>
|
||||
<field name="description">2.6% purch.</field>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_26_incl">
|
||||
<field name="name">2.6% on goods and services (incl.)</field>
|
||||
<field name="description">2.6% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_26_invest">
|
||||
<field name="name">2.6% on invest. and others expenses</field>
|
||||
<field name="description">2.6% invest.</field>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_26_invest_incl">
|
||||
<field name="name">2.6% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">2.6% invest. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.6"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_26"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_sale_38">
|
||||
<field name="name">3.8% Sales</field>
|
||||
<field name="description">3.8%</field>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_343a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_343b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_343a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_343b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_sale_38_incl">
|
||||
<field name="name">3.8% Sales (incl.)</field>
|
||||
<field name="description">3.8% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_343a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_343b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_343a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_343b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_38">
|
||||
<field name="name">3.8% on goods and services</field>
|
||||
<field name="description">3.8% purch.</field>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_38_incl">
|
||||
<field name="name">3.8% on goods and services (incl.)</field>
|
||||
<field name="description">3.8% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_38_invest">
|
||||
<field name="name">3.8% on invest. and others expenses</field>
|
||||
<field name="description">3.8% invest</field>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_38_invest_incl">
|
||||
<field name="name">3.8% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">3.8% invest Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.8"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_38"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_sale_81">
|
||||
<field name="name">8.1% Sales</field>
|
||||
<field name="description">8.1%</field>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_303a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_303b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_303a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_303b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_sale_81_incl">
|
||||
<field name="name">8.1% Sales (incl.)</field>
|
||||
<field name="description">8.1% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_303a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_303b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_303a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_303b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_81">
|
||||
<field name="name">8.1% on goods and services</field>
|
||||
<field name="description">8.1% purch.</field>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_81_incl">
|
||||
<field name="name">8.1% on goods and services (incl.)</field>
|
||||
<field name="description">8.1% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_81_invest">
|
||||
<field name="name">8.1% on invest. and others expenses</field>
|
||||
<field name="description">8.1% invest.</field>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_81_invest_incl">
|
||||
<field name="name">8.1% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">8.1% invest. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="8.1"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record model="account.tax.template" id="vat_purchase_81_return">
|
||||
<field name="name">8.1% Purchase (reverse)</field>
|
||||
<field name="description">8.1% purch. (reverse)</field>
|
||||
<field name="amount" eval="-8.1"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">none</field>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_383a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_383b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_383a_tag')],
|
||||
}),
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_383b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<!--# for reverse charge or VAT on Acquisition (group of taxes)-->
|
||||
<record model="account.tax.template" id="vat_purchase_81_reverse">
|
||||
<field name="name">8.1% on purchase of service abroad (reverse charge)</field>
|
||||
<field name="description">8.1% rev</field>
|
||||
<field name="amount_type">group</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_vat_81"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="children_tax_ids" eval="[(6, 0, [ref('vat_purchase_81'), ref('vat_purchase_81_return')])]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -1,777 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- # TVA - Taxe sur la Valeur Ajoutée (pre-2024 rates change) -->
|
||||
<record model="account.tax.template" id="vat_25">
|
||||
<field name="name">2.5% Sales</field>
|
||||
<field name="description">2.50%</field>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_312a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_312b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_312a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_312b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_25_incl">
|
||||
<field name="name">2.5% Sales (incl.)</field>
|
||||
<field name="description">2.5% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_312a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_312b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_312a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_312b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_25_purchase">
|
||||
<field name="name">2.5% on goods and services</field>
|
||||
<field name="description">2.5% purch.</field>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_25_purchase_incl">
|
||||
<field name="name">2.5% on goods and services (incl.)</field>
|
||||
<field name="description">2.5% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_25_invest">
|
||||
<field name="name">2.5% on invest. and others expenses</field>
|
||||
<field name="description">2.5% invest.</field>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_25_invest_incl">
|
||||
<field name="name">2.5% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">2.5% invest. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="2.5"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_25"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37">
|
||||
<field name="name">3.7% Sales</field>
|
||||
<field name="description">3.70%</field>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_342a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_342b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_342a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_342b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37_incl">
|
||||
<field name="name">3.7% Sales (incl.)</field>
|
||||
<field name="description">3.7% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_342a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_342b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_342a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_342b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37_purchase">
|
||||
<field name="name">3.7% on goods and services</field>
|
||||
<field name="description">3.7% purch.</field>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37_purchase_incl">
|
||||
<field name="name">3.7% on goods and services (incl.)</field>
|
||||
<field name="description">3.7% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37_invest">
|
||||
<field name="name">3.7% on invest. and others expenses</field>
|
||||
<field name="description">3.7% invest</field>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_37_invest_incl">
|
||||
<field name="name">3.7% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">3.7% invest Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="3.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_37"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77">
|
||||
<field name="name">7.7% Sales</field>
|
||||
<field name="description">7.70%</field>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_302a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_302b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_302a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_302b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_incl">
|
||||
<field name="name">7.7% Sales (incl.)</field>
|
||||
<field name="description">7.7% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_302a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_302b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_302a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_2200'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_302b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_purchase_incl">
|
||||
<field name="name">7.7% on goods and services (incl.)</field>
|
||||
<field name="description">7.7% purch. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_invest">
|
||||
<field name="name">7.7% on invest. and others expenses</field>
|
||||
<field name="description">7.7% invest.</field>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_invest_incl">
|
||||
<field name="name">7.7% on invest. and others expenses (incl.)</field>
|
||||
<field name="description">7.7% invest. Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_XO">
|
||||
<field name="name">0% Export</field>
|
||||
<field name="amount" eval="0.00"/>
|
||||
<field name="description">0%</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_220_289_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_220_289_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_O_exclude">
|
||||
<field name="name">0% Excluded</field>
|
||||
<field name="description">0% excl.</field>
|
||||
<field name="amount" eval="0.00"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_230_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_230_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_O_import">
|
||||
<field name="name">0% Import</field>
|
||||
<field name="description">0% import.</field>
|
||||
<field name="amount" eval="0.00"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_100_import">
|
||||
<field name="name">Customs VAT on goods and services</field>
|
||||
<field name="description">100% imp.</field>
|
||||
<field name="amount" eval="100"/>
|
||||
<field name="amount_type">division</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_100"/>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_100_import_invest">
|
||||
<field name="name">Customs VAT on invest. and others expenses</field>
|
||||
<field name="description">100% imp.invest.</field>
|
||||
<field name="amount" eval="100"/>
|
||||
<field name="amount_type">division</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_100"/>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1171'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_405_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_purchase_return">
|
||||
<field name="name">7.7% Purchase (reverse)</field>
|
||||
<field name="description">7.7% purch. (return)</field>
|
||||
<field name="amount" eval="-7.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="type_tax_use">none</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_382a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_382b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_382a_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_382b_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_77_purchase">
|
||||
<field name="name">7.7% on goods and services</field>
|
||||
<field name="description">7.7% purch.</field>
|
||||
<field name="amount" eval="7.7"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {'repartition_type': 'base'}),
|
||||
|
||||
(0,0, {
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('ch_coa_1170'),
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_400_tag')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<!--# for reverse charge or VAT on Acquisition (group of taxes)-->
|
||||
<record model="account.tax.template" id="vat_77_purchase_reverse">
|
||||
<field name="description">7.7% rev.</field>
|
||||
<field name="name">7.7% on purchase of service abroad (reverse charge)</field>
|
||||
<field name="amount_type">group</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="tax_group_id" ref="tax_group_tva_77"/>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="children_tax_ids" eval="[(6, 0, [ref('vat_77_purchase_return'), ref('vat_77_purchase')])]"/>
|
||||
</record>
|
||||
<!-- Taxes for other movements -->
|
||||
<record model="account.tax.template" id="vat_other_movements_900">
|
||||
<field name="name">0% - Subsidies, tourist taxes</field>
|
||||
<field name="amount" eval="0.00"/>
|
||||
<field name="description">0% subventions</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_900_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_900_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="vat_other_movements_910">
|
||||
<field name="name">0% - Donations, dividends, compensation</field>
|
||||
<field name="amount" eval="0.00"/>
|
||||
<field name="description">0% dons</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_tva_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'plus_report_expression_ids': [ref('account_tax_report_line_chtax_910_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'repartition_type': 'base',
|
||||
'minus_report_expression_ids': [ref('account_tax_report_line_chtax_910_tag')],
|
||||
}),
|
||||
|
||||
(0,0, {'repartition_type': 'tax'}),
|
||||
]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Account Tags -->
|
||||
<record id="l10nch_chart_template" model="account.chart.template">
|
||||
<field name="name">Plan comptable 2015 (Suisse)</field>
|
||||
<field name="code_digits">4</field>
|
||||
<field name="bank_account_code_prefix">102</field>
|
||||
<field name="cash_account_code_prefix">100</field>
|
||||
<field name="transfer_account_code_prefix">1090</field>
|
||||
<field name="currency_id" ref="base.CHF"/>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
<field name="spoken_languages" eval="'it_IT;de_DE;de_CH;fr_FR;fr_CH'"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="l10nch_chart_template" model="account.chart.template">
|
||||
<field name="property_account_receivable_id" ref="ch_coa_1100"/>
|
||||
<field name="property_account_payable_id" ref="ch_coa_2000"/>
|
||||
<field name="property_account_expense_categ_id" ref="ch_coa_4200"/>
|
||||
<field name="property_account_income_categ_id" ref="ch_coa_3200"/>
|
||||
<field name="income_currency_exchange_account_id" ref="ch_coa_3806"/>
|
||||
<field name="expense_currency_exchange_account_id" ref="ch_coa_4906"/>
|
||||
<field name="default_pos_receivable_account_id" ref="ch_coa_1101" />
|
||||
<field name="account_journal_early_pay_discount_loss_account_id" ref="ch_coa_4901"/>
|
||||
<field name="account_journal_early_pay_discount_gain_account_id" ref="ch_coa_3801"/>
|
||||
<field name="property_tax_payable_account_id" ref="ch_coa_2201"/>
|
||||
<field name="property_tax_receivable_account_id" ref="ch_coa_1176"/>
|
||||
<field name="default_cash_difference_expense_account_id" ref="ch_coa_4991"/>
|
||||
<field name="default_cash_difference_income_account_id" ref="ch_coa_4992"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
"id","name","code","account_type","reconcile","non_trade","name@de","name@it","name@fr"
|
||||
"ch_coa_1060","Securities (with stock exchange price)","1060","asset_current","False","","Wertpapiere (mit Börsenkurs)","Titoli","Titres"
|
||||
"ch_coa_1069","Accumulated depreciation on securities","1069","asset_current","False","","Kumulierte Abschreibungen auf Wertpapiere","Rettifica valore titoli","Ajustement de la valeur des titres"
|
||||
"ch_coa_1090","Salary-Pass-Through Account","1090","asset_current","True","","Gehaltsdurchlaufkonto","Conto di trasferimento dello stipendio","Compte de transfert de salaire"
|
||||
"ch_coa_1091","Transfer account: Salaries","1091","asset_current","True","","Transferkonto: Gehälter","Conto d'attesa - Salari","Compte d'attente pour salaires"
|
||||
"ch_coa_1099","Transfer account: miscellaneous","1099","asset_current","True","","Transferkonto: Verschiedenes","Conto d'attesa - Altro","Compte d'attente autre"
|
||||
"ch_coa_1100","Accounts receivable from goods and services (Debtors)","1100","asset_receivable","True","","Forderungen aus Lieferungen und Leistungen (Debitoren)","Crediti da forniture e prestazioni (debitori)","Débiteurs"
|
||||
"ch_coa_1101","Receivable (PoS)","1101","asset_receivable","True","","Forderungen (PoS)","Crediti (Punti vendita)","Débiteurs (PoS)"
|
||||
"ch_coa_1109","Del credere (Acc. depr. on debtors)","1109","asset_current","False","","Delkredere (Akontoabzug für Schuldner)","Del credere","Ducroire"
|
||||
"ch_coa_1140","Advances and loans","1140","asset_current","False","","Vorschüsse und Darlehen","Anticipi e prestiti","Avances et prêts"
|
||||
"ch_coa_1149","Advances and loans adjustments","1149","asset_current","False","","Anpassungen von Vorschüssen und Darlehen","Rettifica valore anticipi e prestiti","Ajustement de la valeur des avances et des prêts"
|
||||
"ch_coa_1170","Input Tax (VAT) receivable on material, goods, services, energy","1170","asset_current","False","","Vorsteuer (MwSt.) auf Material, Waren, Dienstleistungen, Energie","IVA, imposta precedente su materiale, merce, servizi ed energia","Impôt préalable: TVA s/matériel, marchandises, prestations et énergie"
|
||||
"ch_coa_1171","Input Tax (VAT) receivable on investments, other operating expenses","1171","asset_current","False","","Vorsteuer (MwSt.) auf Investitionen, sonstige betriebliche Aufwendungen","IVA, imposta precedente su investimenti e altri costi d’esercizio","Impôt préalable: TVA s/investissements et autres charges d’exploitation"
|
||||
"ch_coa_1176","Withholding Tax (WT) receivable","1176","asset_receivable","True","True","Forderungen Quellensteuer","Imposta preventiva","Impôt anticipé"
|
||||
"ch_coa_1180","Receivables from social insurances and social security institutions","1180","asset_current","False","","Forderungen gegenüber Sozialversicherungen und Vorsorgeeinrichtungen","Crediti da assicurazioni sociali e istituti di previdenza","Créances envers les assurances sociales et institutions de prévoyance"
|
||||
"ch_coa_1189","Withholding tax","1189","asset_current","False","","Quellensteuer","Imposta alla fonte","Impôt à la source"
|
||||
"ch_coa_1190","Other short-term receivables","1190","asset_current","False","","Sonstige kurzfristige Forderungen","Altri crediti a breve termine","Autres créances à court terme"
|
||||
"ch_coa_1199","Accumulated depreciation on short-terms receivables","1199","asset_current","False","","Kumulierte Abschreibungen auf kurzfristige Forderungen","Rettifica valore crediti diversi a breve termine","Ajustement de la valeur des créances à court terme"
|
||||
"ch_coa_1200","Goods / Merchandise (Trade)","1200","asset_current","False","","Waren / Güter (Handel)","Merce di rivendita","Marchandises commerciales"
|
||||
"ch_coa_1207","Accumulated depreciation on Goods / Merchandise (Trade)","1207","asset_current","False","","Kumulierte Abschreibungen auf Waren / Handelswaren (Handel)","Variazione delle rimanenze di merci","Variation des stocks de marchandises"
|
||||
"ch_coa_1208","Downpayment on Goods / Merchandise (Trade)","1208","asset_current","False","","Akonto auf Güter / Handelswaren (Handel)","Acconti su beni commerciali","Acomptes sur les marchandises commerciales"
|
||||
"ch_coa_1209","Correction on Goods / Merchandise (Trade)","1209","asset_current","False","","Wertberichtigung Handelswaren","Rettifiche di valore delle scorte di beni","Corrections de la valeur des stocks de marchandises"
|
||||
"ch_coa_1210","Raw materials","1210","asset_current","False","","Rohstoffe","Materie prime","Matières premières"
|
||||
"ch_coa_1217","Accumulated depreciation on raw material","1217","asset_current","False","","Kumulierte Abschreibung von Rohstoffen","Variazione delle rimanenze di materie prime","Variation des stocks des matières premières"
|
||||
"ch_coa_1218","Downpayment on raw material","1218","asset_current","False","","Anzahlung auf Rohmaterial","Acconti su materie prime","Acomptes sur matières premières"
|
||||
"ch_coa_1219","Correction on raw material","1219","asset_current","False","","Berichtigung Rohmaterial","Rettifiche di valore su materie prime","Corrections de la valeur sur matières premières"
|
||||
"ch_coa_1220","Auxiliary material","1220","asset_current","False","","Hilfsmaterial","Materiali ausiliari","Matières auxiliaires"
|
||||
"ch_coa_1230","Consumables","1230","asset_current","False","","Verbrauchsgüter","Materiale di consumo","Matières consommables"
|
||||
"ch_coa_1250","Consignments Goods","1250","asset_current","False","","Handelswaren in Konsignation","Beni in conto deposito","Marchandises en consignation"
|
||||
"ch_coa_1260","Finished products","1260","asset_current","False","","Fertige Erzeugnisse","Prodotti finiti","Stocks de produits finis"
|
||||
"ch_coa_1267","Accumulated depreciation on Finished products","1267","asset_current","False","","Bestandesänderungen fertige Erzeugnisse","Variazione delle scorte di prodotti finiti","Variation de stocks de produits finis"
|
||||
"ch_coa_1269","Correction on Finished products","1269","asset_current","False","","Wertberichtigungen fertige Erzeugnisse","Correzione del valore delle rimanenze di prodotti finiti","Correction de la valeur de stocks de produits finis"
|
||||
"ch_coa_1270","Products in process / Unfinished products","1270","asset_current","False","","Unfertige Erzeugnisse","Scorte di semilavorati","Stocks de produits semi-ouvrés"
|
||||
"ch_coa_1277","Accumulated depreciation on Products in process / Unfinished products","1277","asset_current","False","","Kumulierte Abschreibungen auf Waren in Arbeit / Unfertige Erzeugnisse","Variazione delle scorte di prodotti semilavorati","Variation de stock produits semi-ouvrés"
|
||||
"ch_coa_1279","Correction on Products in process / Unfinished products","1279","asset_current","False","","Berichtigung für Unfertige Erzeugnisse","Correzioni del valore delle rimanenze di semilavorati","Corrections de la valeur des stock produits semi-ouvrés"
|
||||
"ch_coa_1280","Work in progress","1280","asset_current","False","","Nicht fakturierte Dienstleistungen","Prodotti in corso di fabbricazione","Travaux en cours"
|
||||
"ch_coa_1287","Accumulated depreciation on work in progress","1287","asset_current","False","","Kumulierte Abschreibungen auf laufende Aufträge","Variazione di valore dei lavori in corso","Variation de la valeur des travaux en cours"
|
||||
"ch_coa_1289","Correction on work in progress","1289","asset_current","False","","Korrekturen laufende Projekte","Correzioni di valore di lavori in corso","Corrections de la valeur des travaux en cours"
|
||||
"ch_coa_1300","Accrued revenue and deferred expense (Accounts paid in advance)","1300","asset_current","False","","Rechnungsabgrenzungsposten (im Voraus gezahlte Rechnungen)","Costi anticipati","Charges payées d‘avance"
|
||||
"ch_coa_1301","Deferred expense (Accounts paid in advance)","1301","asset_current","False","","Noch nicht erhaltener Ertrag","Ricavi da incassare","Produits à recevoir"
|
||||
"ch_coa_1400","Long-term securities","1400","asset_current","False","","Langfristige Wertpapiere","Titoli a lungo termine","Titres à long terme"
|
||||
"ch_coa_1409","Accumulated depreciation on long-term securities","1409","asset_current","False","","Kumulierte Abschreibungen auf langfristige Wertpapiere","Rettifica valore titoli","Ajustement de la valeur des titres"
|
||||
"ch_coa_1440","Loan (Asset)","1440","asset_current","False","","Darlehen (Vermögenswert)","Prestiti","Prêts"
|
||||
"ch_coa_1441","Mortgages","1441","asset_current","False","","Hypotheken","Prestiti ipotecari","Hypothèques"
|
||||
"ch_coa_1449","Accumulated depreciation on long term receivables","1449","asset_current","False","","Kumulierte Abschreibungen auf langfristige Forderungen","Rettifica valore crediti a lungo termine","Ajustement de la valeur des créances à long terme"
|
||||
"ch_coa_1480","Participations","1480","asset_current","False","","Beteiligungen","Partecipazioni","Participations"
|
||||
"ch_coa_1489","Accumulated depreciation on participations","1489","asset_current","False","","Kumulierte Abschreibungen auf Beteiligungen","Rettifica valore partecipazioni","Ajustement de la valeur des participations"
|
||||
"ch_coa_1500","Machinery","1500","asset_current","False","","Maschinen","Macchine e attrezzature","Machines et appareils"
|
||||
"ch_coa_1509","Accumulated depreciation on machinery","1509","asset_current","False","","Kumulierte Abschreibungen auf Maschinen","Ammortamenti su macchinari e attrezzature","Amortissements sur les machines et appareils"
|
||||
"ch_coa_1510","Equipment","1510","asset_current","False","","Ausrüstung","Mobilio e installazioni","Mobilier et installations"
|
||||
"ch_coa_1519","Accumulated depreciation on equipment","1519","asset_current","False","","Kumulierte Abschreibungen auf Ausrüstungen","Ammortamenti su mobili e arredi","Amortissements sur le mobilier et les installations"
|
||||
"ch_coa_1520","Office Equipment (including Information & Communication Technology)","1520","asset_current","False","","Büroausstattung (einschließlich Informations- und Kommunikationstechnologie)","Macchine ufficio, informatica e tecnologia della comunicazione","Machines de bureau, informatique, systèmes de communication"
|
||||
"ch_coa_1529","Accumulated depreciation on office equipment (incl. ICT)","1529","asset_current","False","","Kumulierte Abschreibungen auf Büroausstattung (einschließlich ICT)","Ammortamenti su macchine da ufficio, inf. e sistemi di comunicazione","Amortissements sur les machines de bureau, inf. et syst. comm."
|
||||
"ch_coa_1530","Vehicles","1530","asset_current","False","","Fahrzeuge","Veicoli","Véhicules"
|
||||
"ch_coa_1539","Accumulated depreciation on vehicles","1539","asset_current","False","","Kumulierte Abschreibungen auf Fahrzeuge","Ammortamenti su veicoli","Amortissements sur les véhicules"
|
||||
"ch_coa_1540","Tools","1540","asset_current","False","","Werkzeuge","Utensili e apparecchiature","Outillages et appareils"
|
||||
"ch_coa_1549","Accumulated depreciation on tools","1549","asset_current","False","","Kumulierte Abschreibungen auf Werkzeuge","Ammortamenti su utensili e attrezzature","Amortissements sur les outillages et appareils"
|
||||
"ch_coa_1550","Warehouse","1550","asset_current","False","","Lager","Strutture per il deposito","Installations de stockage"
|
||||
"ch_coa_1559","Accumulated depreciation on warehouse","1559","asset_current","False","","Kumulierte Abschreibungen auf Lagerhäuser","Ammortamenti sui magazzini","Amortissements sur les installations de stockage"
|
||||
"ch_coa_1570","Equipment and Facilities","1570","asset_current","False","","Feste Einrichtungen und Installationen","Attrezzature e infrastrutture","Équipements et installations"
|
||||
"ch_coa_1579","Accumulated depreciation on Equipment and Facilities","1579","asset_current","False","","Abschreibungen feste Einrichtungen und Installationen","Ammortamenti su attrezzature e infrastrutture","Amortissements cumulés sur les équipements et installations"
|
||||
"ch_coa_1590","Other movable tangible assets","1590","asset_current","False","","Sonstige bewegliche Sachanlagen","Altre immobilizzazioni materiali","Autres immobilisations corporelles meubles"
|
||||
"ch_coa_1599","Accumulated depreciation on Other movable tangible assets","1599","asset_current","False","","Kumulierte Abschreibungen auf Sonstige bewegliche Sachanlagen","Ammortamenti su altre immobilizzazioni materiali mobiliari","Amortissements sur les autres immobilisations corporelles meubles"
|
||||
"ch_coa_1600","Real Estate","1600","asset_current","False","","Liegenschaften","Immobili aziendali","Immeubles d’exploitation"
|
||||
"ch_coa_1609","Accumulated depreciation on real estate","1609","asset_current","False","","Kumulierte Abschreibungen auf Immobilien","Ammortamenti su immobili in esercizio","Amortissements sur les immeubles d’exploitation"
|
||||
"ch_coa_1700","Patents, Licences","1700","asset_current","False","","Patente, Lizenzen","Patenti, know-how, licenze, diritti e sviluppo","Brevets, know-how, licences, droits, développement"
|
||||
"ch_coa_1709","Accumulated depreciation on Patents, Licences","1709","asset_current","False","","Kumulierte Abschreibungen auf Patente, Lizenzen","Ammortamento di brevetti, know-how, licenze, diritti, dev.","Amortissements sur les brevets, know-how, licences, droits, dév."
|
||||
"ch_coa_1770","Goodwill","1770","asset_current","False","","Geschäftswert","Avviamento","Goodwill"
|
||||
"ch_coa_1779","Accumulated depreciation on goodwill","1779","asset_current","False","","Kumulierte Abschreibungen auf den Geschäftswert","Rettifica valore avviamento","Ajustement de la valeur des goodwill"
|
||||
"ch_coa_1850","Non-paid-in share capital","1850","asset_current","False","","Nicht eingezahltes Grundkapital","Capitale azionario, capitale sociale, diritti di partecipazione o capitale della fondazione non versati","Capital actions, capital social, droits de participations ou capital de fondation non versés"
|
||||
"ch_coa_2000","Accounts payable from goods and services (Creditors)","2000","liability_payable","True","","Verbindlichkeiten aus Lieferungen und Leistungen (Gläubiger)","Debiti per forniture e prestazioni (creditori)","Créanciers"
|
||||
"ch_coa_2030","Prepayments received","2030","liability_current","False","","Erhaltene Anzahlungen","Acconti ricevuti","Acomptes de clients"
|
||||
"ch_coa_2100","Bank Overdraft (Bank)","2100","liability_current","False","","Überziehungskredit (Bank)","Debiti bancari","Dettes bancaires"
|
||||
"ch_coa_2120","Leasing bondings","2120","liability_current","False","","Leasing Anleihen","Impegni leasing finanziari","Engagements de financement par leasing"
|
||||
"ch_coa_2140","Other interest-bearing short terms liabilities","2140","liability_current","False","","Sonstige verzinsliche kurzfristige Verbindlichkeiten","Altri debiti a breve termine onerosi","Autres dettes à court terme rémunérées"
|
||||
"ch_coa_2160","Dettes envers l'actionnaire","2160","liability_current","False","","Verbindlichkeiten gegenüber dem Aktionär","Debiti verso l'azionista","Dettes envers l'actionnaire"
|
||||
"ch_coa_2200","Sales Tax (VAT) owed","2200","liability_current","False","","Geschuldete MwSt. (Umsatzsteuer)","IVA dovuta","TVA due"
|
||||
"ch_coa_2201","VAT payable","2201","liability_payable","True","True","Zu zahlende MwSt.","IVA, rendiconto","Décompte TVA"
|
||||
"ch_coa_2206","Withholding Tax (WT) owed","2206","liability_current","False","","Geschuldete Quellensteuer","Imposta preventiva","Impôt anticipé dû"
|
||||
"ch_coa_2208","Direct Taxes","2208","liability_current","False","","Direkte Steuern","Imposte dirette","Impôts directs"
|
||||
"ch_coa_2210","Others short term liabilities","2210","liability_current","False","","Sonstige kurzfristige Verbindlichkeiten","Altri debiti a breve termine","Autres dettes à court terme"
|
||||
"ch_coa_2261","Dividend payouts resolved (Dividends)","2261","liability_current","False","","Beschlossene Dividendenausschüttungen (Dividende)","Dividendi","Dividendes"
|
||||
"ch_coa_2270","Social insurances owed","2270","liability_current","False","","Geschuldete Sozialversicherungen","Assicurazioni sociali e istituti di previdenza","Assurances sociales et institutions de prévoyance"
|
||||
"ch_coa_2271","Retirement Provision","2271","liability_current","False","","Altersvorsorge","Previdenza pensionistica","Prévoyance vieillesse"
|
||||
"ch_coa_2272","Social Insurance CAF/FAK","2272","liability_current","False","","Sozialversicherung FAK","Assicurazione sociale FAK","Assurances sociales CAF"
|
||||
"ch_coa_2273","Accident Insurance","2273","liability_current","False","","Unfallversicherung","Assicurazione contro gli infortuni","Assurance Accident"
|
||||
"ch_coa_2274","Daily Sickness Insurance","2274","liability_current","False","","Krankentagegeldversicherung","Assicurazione malattia giornaliera","Assurance maladie journalière"
|
||||
"ch_coa_2279","Withholding taxes","2279","liability_current","False","","Quellensteuer","Imposte alla fonte","Impôt à la source"
|
||||
"ch_coa_2300","Deferred revenue and accrued expenses (Accounts received in advance)","2300","liability_current","False","","Rechnungsabgrenzungsposten (im Voraus erhaltene Rechnungen)","Costi da pagare","Charges à payer"
|
||||
"ch_coa_2301","Deferred revenue (Accounts Received in Advance)","2301","liability_current","False","","Umsatzabgrenzungsposten (im Voraus erhaltene Rechnungen)","Ricavi incassati dell’anno seguente","Produits encaissés d’avance"
|
||||
"ch_coa_2330","Short-term provisions","2330","liability_current","False","","Kurzfristige Rückstellungen","Accantonamenti a breve termine","Provisions à court terme"
|
||||
"ch_coa_2350","13th Month Provision","2350","liability_current","False","","13. Monatsgehalt","Accantonamento 13° mese","Provision du 13e mois"
|
||||
"ch_coa_2351","14th Month Provision","2351","liability_current","False","","14. Monatsgehalt","Accantonamento 14° mese","Provision du 14e mois"
|
||||
"ch_coa_2400","Bank debts","2400","liability_current","False","","Bankschulden","Debiti bancari","Dettes bancaires"
|
||||
"ch_coa_2420","Finance lease commitments","2420","liability_current","False","","Verpflichtungen aus Finanzierungsleasing","Impegni leasing finanziari","Engagements de financement par leasing"
|
||||
"ch_coa_2430","Debentures","2430","liability_current","False","","Schuldverschreibungen","Prestiti obbligazionari","Emprunts obligataires"
|
||||
"ch_coa_2450","Loans","2450","liability_current","False","","Darlehen","Prestiti","Emprunts"
|
||||
"ch_coa_2451","Mortgages","2451","liability_current","False","","Hypotheken","Prestiti ipotecari","Hypothèques"
|
||||
"ch_coa_2500","Other long term liabilities","2500","liability_current","False","","Sonstige langfristige Verbindlichkeiten","Altri debiti a lungo termine","Autres dettes à long terme"
|
||||
"ch_coa_2600","Long-term provisions","2600","liability_current","False","","Langfristige Rückstellungen","Accantonamenti","Provisions"
|
||||
"ch_coa_2800","Share capital","2800","equity","False","","Grundkapital","Capitale azionario, capitale sociale, diritti di partecipazione o capitale della fondazione","Capital-actions, capital social, capital de fondation"
|
||||
"ch_coa_2900","Legal capital reserves","2900","equity","False","","Gesetzliche Kapitalrücklagen","Riserva legale da capitale","Réserves légales issues du capital"
|
||||
"ch_coa_2940","Valuation Reserves","2940","equity","False","","Bewertungsreserven","Riserve da rivalutazioni","Réserves d‘évaluation"
|
||||
"ch_coa_2950","Legal retained earnings (Reserves)","2950","equity","False","","Gesetzliche Gewinnrücklagen (Reserven)","Riserva legale da utili","Réserves légales issues du bénéfice"
|
||||
"ch_coa_2960","Voluntary retained earnings","2960","equity","False","","Freiwillige Gewinnrücklagen","Riserve facoltative da utili","Réserves libres"
|
||||
"ch_coa_2970","Profits brought forward / Losses brought forward","2970","equity","False","","Gewinnvortrag / Verlustvortrag","Utile/perdita riportata","Bénéfice / perte reporté"
|
||||
"ch_coa_2979","Annual profit or annual loss","2979","equity","False","","Jahresgewinn oder Jahresverlust","Utile/perdita annuale","Bénéfice / perte de l’exercice"
|
||||
"ch_coa_2980","Treasury stock, shares, participation rights (negative item)","2980","equity","False","","Eigene Aktien, Stammanteile (Minusposten)","Quote proprie, azioni, diritti di partecipazione (voce negativa)","Actions propres, parts, droits de participation (poste négatif)"
|
||||
"ch_coa_3000","Sales of products (Manufacturing)","3000","income","False","","Verkauf von Produkten (Herstellung)","Ricavi prodotti fabbricati","Ventes de produits fabriqués"
|
||||
"ch_coa_3009","Deductions on sales","3009","income","False","","Abzüge bei Verkäufen","Diminuzione di ricavi","Déductions sur ventes"
|
||||
"ch_coa_3200","Sales of goods (Trade)","3200","income","False","","Warenverkauf (Handel)","Ricavi merci di rivendita","Ventes de marchandises"
|
||||
"ch_coa_3400","Revenues from services","3400","income","False","","Erlöse aus Dienstleistungen","Ricavi prestazioni di servizi","Ventes de prestations"
|
||||
"ch_coa_3600","Other revenues","3600","income","False","","Sonstige Einnahmen","Altri ricavi e prestazioni di servizi","Autres ventes et prestations de services"
|
||||
"ch_coa_3700","Own services","3700","income","False","","Eigene Leistungen","Lavori interni","Prestations propres"
|
||||
"ch_coa_3710","Own consumption","3710","income","False","","Eigenverbrauch","Consumo proprio","Consommations propres"
|
||||
"ch_coa_3800","Financial discount","3800","income","False","","Erlösminderung","Sconti","Escomptes"
|
||||
"ch_coa_3801","Discounts and price reduction","3801","income","False","","Rabatte und Preisnachlässe","Sconti e riduzioni di prezzo","Rabais et réduction de prix"
|
||||
"ch_coa_3802","Rebates","3802","income","False","","Nachlässe","Sconti","Ristournes"
|
||||
"ch_coa_3803","Third-party commissions","3803","income","False","","Provisionen Dritter","Commissioni di terzi","Commissions de tiers"
|
||||
"ch_coa_3804","Collection fees","3804","income","False","","Inkassogebühren","Tasse di riscossione","Frais d'encaissement"
|
||||
"ch_coa_3805","Losses from bad debts","3805","income","False","","Verluste aus Forderungsausfällen","Perdite su crediti commerciali, variazione del fondo svalutazione crediti","Pertes sur créances clients, variation ducroire"
|
||||
"ch_coa_3806","Exchange rate differences","3806","income","False","","Wechselkursdifferenzen","Differenze di cambio","Différences de change"
|
||||
"ch_coa_3807","Shipping & Returns","3807","income","False","","Versand und Rücksendung","Costi di spedizione","Frais d'expédition"
|
||||
"ch_coa_3900","Changes in inventories of unfinished and finished products","3900","income","False","","Veränderung des Bestandes unfertiger und fertiger Erzeugnisse","Variazione delle scorte di prodotti in corso di fabbricazione","Variation des stocks de produits semi-finis"
|
||||
"ch_coa_3901","Change in inventories of finished goods","3901","income","False","","Veränderung des Bestandes an Fertigerzeugnissen","Variazione delle scorte di prodotti finiti","Variation des stocks de produits finis"
|
||||
"ch_coa_3940","Change in the value of unbilled services","3940","income","False","","Bestandesänderungen nicht fakturierte Dienstleistungen","Variazione prestazioni di servizi non fatturate","Variation de la valeur des prestations non facturées"
|
||||
"ch_coa_4000","Cost of raw materials (Manufacturing)","4000","expense","False","","Materialaufwand Produktion","Costi materiale per la fabbricazione","Charges de matériel de l‘atelier"
|
||||
"ch_coa_4008","Inventory changes","4008","expense","False","","Bestandsänderungen","Variazioni delle rimanenze","Variations de stocks"
|
||||
"ch_coa_4009","Deductions obtained on purchases","4009","expense","False","","Bei Käufen erzielte Abzüge","Deduzioni ottenute sugli acquisti","Déductions obtenues sur achats"
|
||||
"ch_coa_4070","Purchase Loans","4070","expense","False","","Frachtkosten","Acquisto di prestiti","Frêts à l'achat"
|
||||
"ch_coa_4071","Customs duties on importation","4071","expense","False","","Einfuhrzölle","Dazi doganali all'importazione","Droits de douanes à l'importation"
|
||||
"ch_coa_4072","Transport costs at purchase","4072","expense","False","","Transportkosten beim Erwerb","Costi di trasporto all'acquisto","Frais de transport à l'achat"
|
||||
"ch_coa_4080","Inventory changes","4080","expense","False","","Bestandsänderungen","Variazioni delle rimanenze","Variations de stocks"
|
||||
"ch_coa_4086","Loss of material","4086","expense","False","","Materialverlust","Perdita di materiale","Pertes de matières"
|
||||
"ch_coa_4200","Cost of materials (Trade)","4200","expense","False","","Materialkosten (Handel)","Acquisti di beni destinati alla rivendita","Achats de marchandises destinées à la revente"
|
||||
"ch_coa_4400","Cost of purchased services","4400","expense","False","","Aufwand für bezogene Dienstleistungen","Lavori di terzi/prestazioni di subappaltanti","Prestations / travaux de tiers"
|
||||
"ch_coa_4500","Electricity","4500","expense","False","","Elektrizität","Elettricità","Electricité"
|
||||
"ch_coa_4510","Gas","4510","expense","False","","Gas","Gas","Gaz"
|
||||
"ch_coa_4520","Fuel oil","4520","expense","False","","Heizöl","Olio combustibile","Mazout"
|
||||
"ch_coa_4521","Coal, briquettes, wood","4521","expense","False","","Kohle, Briketts, Holz","Carbone, bricchette, legno","Charbon, briquettes, bois"
|
||||
"ch_coa_4530","Petrol","4530","expense","False","","Benzin","Carburante","Essence"
|
||||
"ch_coa_4540","Water","4540","expense","False","","Wasser","Acqua","Eau"
|
||||
"ch_coa_4800","Change in inventories of goods","4800","expense","False","","Veränderung der Warenvorräte","Variazione delle rimanenze di merci","Variation des stocks de marchandises"
|
||||
"ch_coa_4801","Change in raw material inventories","4801","expense","False","","Änderung der Rohstoffvorräte","Variazione delle rimanenze di materie prime","Variation des stocks de matières premières"
|
||||
"ch_coa_4900","Financial Discounts","4900","expense","False","","Finanzielle Ermäßigungen","Sconti","Escomptes"
|
||||
"ch_coa_4901","Discounts and price reductions","4901","expense","False","","Rabatte und Preisnachlässe","Sconti e riduzioni di prezzo","Rabais et réductions de prix"
|
||||
"ch_coa_4092","Rebates","4902","expense","False","","Nachlässe","Sconti","Ristournes"
|
||||
"ch_coa_4903","Commissions on purchases","4903","expense","False","","Provisionen auf Käufe","Commissioni sugli acquisti","Commissions obtenues sur achats"
|
||||
"ch_coa_4906","Exchange rate differences","4906","expense","False","","Wechselkursdifferenzen","Differenze di cambio","Différences de change"
|
||||
"ch_coa_4991","Cash Difference Loss","4991","expense","False","","Bardifferenzverlust","Perdita per differenza di cassa","Perte de Différence de change"
|
||||
"ch_coa_4992","Cash Difference Gain","4992","income_other","False","","Bardifferenzgewinn","Utile da differenza di cassa","Gain de différence de change"
|
||||
"ch_coa_5000","Wages and salaries","5000","expense","False","","Löhne und Gehälter","Salari","Salaires"
|
||||
"ch_coa_5001","Social Insurance Payments","5001","expense","False","","Sozialversicherungsbeiträge","Pagamenti dell'assicurazione sociale","Paiements d'assurance sociale"
|
||||
"ch_coa_5002","Profit Sharing","5002","expense","False","","Gewinnbeteiligung","Partecipazione agli utili","Participation aux bénéfices"
|
||||
"ch_coa_5003","Salary Advance","5003","expense","False","","Lohnvorschuss","Anticipo sul salario","Avance sur salaire"
|
||||
"ch_coa_5004","Holidays payment after departure","5004","expense","False","","Ferienentschädigung nach Austritt","Pagamento vacanze dopo partenza","Indemnité de vacances après départ"
|
||||
"ch_coa_5005","13th Month","5005","expense","False","","13. Monat","13esima","13ᵉ salaire"
|
||||
"ch_coa_5006","Gratification","5006","expense","False","","Gratifikation","Gratificazione","Gratification"
|
||||
"ch_coa_5007","Bonus","5007","expense","False","","Prämien","Bonus","Bonus"
|
||||
"ch_coa_5009","Jubilee Gift","5009","expense","False","","Jubiläumsgeschenk","Regalo giubileo","Cadeau de jubilé"
|
||||
"ch_coa_5010","Commissions","5010","expense","False","","Provisionen","Commissioni","Commissions"
|
||||
"ch_coa_5011","14th Month","5011","expense","False","","14. Monat","14esima","14ᵉ salaire"
|
||||
"ch_coa_5030","Travelling Expenses","5030","expense","False","","Reisekosten","Spese di viaggio","Frais de déplacement"
|
||||
"ch_coa_5031","Company Car Correction","5031","expense","False","","Korrektur Firmenfahrzeug","Correzione auto aziendale","Correction pour véhicule de fonction"
|
||||
"ch_coa_5040","Salary Allowances","5040","expense","False","","Familien- und Kinderzulagen","Indennità salariali","Allocations salariales"
|
||||
"ch_coa_5601","CA Fees","5601","expense","False","","Honorare Verwaltungsrat","Provvigioni agenti","Frais du CA"
|
||||
"ch_coa_5700","Social benefits","5700","expense","False","","Sozialleistungen","Oneri sociali","Charges sociales"
|
||||
"ch_coa_5701","Social benefits AC","5701","expense","False","","ALV-Beiträge","Oneri sociali AC","Prestations sociales AC"
|
||||
"ch_coa_5710","Family compensation fund","5710","expense","False","","Familienausgleichskasse","Fondo di compensazione familiare","Caisse de compensation familiale"
|
||||
"ch_coa_5720","Social Benefits LPP","5720","expense","False","","BVG-Beiträge","Prestazioni sociali LPP","Prestations sociales LPP"
|
||||
"ch_coa_5721","Social Benefits LPP Redemption","5721","expense","False","","Rückkauf von BVG-Beiträgen","Riscatto prestazioni sociali LPP","Rachat prestations sociales LPP"
|
||||
"ch_coa_5730","Social Benefits AANP","5730","expense","False","","NBUV-Beiträge","Prestazioni sociali AANP","Prestations sociales AANP"
|
||||
"ch_coa_5731","Social Benefits Optional LAAC Redemption","5731","expense","False","","Freiwilliger Einkauf von UVG-Sozialleistungen","Riscatto facoltativo prestazioni sociali LAAC","Rachat optionnel prestations sociales LAAC"
|
||||
"ch_coa_5740","Social Benefits IJM/CM","5740","expense","False","","KTG-Beiträge","Prestazioni sociali IGM/CM","Prestations sociales IJM/CM"
|
||||
"ch_coa_5790","Withholding Taxes IS","5790","liability_current","False","","IS-Quellensteuer","Imposte alla fonte IS","Impôts à la source IS"
|
||||
"ch_coa_5800","Other staff cost","5800","expense","False","","Sonstige Personalkosten","Altri costi del personale","Autres charges du personnel"
|
||||
"ch_coa_5810","Professional Training","5810","expense","False","","Berufsausbildung","Formazione professionale","Formation Professionnelle"
|
||||
"ch_coa_5820","Travel Expenses","5820","expense","False","","Reisespesen","Spese di viaggio","Frais de voyage"
|
||||
"ch_coa_5821","Lunch Expenses","5821","expense","False","","Verpflegungsspesen","Spese pasti","Frais de repas"
|
||||
"ch_coa_5822","Nightly Expenses","5822","expense","False","","Übernachtungsspesen","Spese trasferta notturna","Frais de nuitée"
|
||||
"ch_coa_5830","Representation Fees","5830","expense","False","","Repräsentationsspesen","Costi di rappresentanza","Frais de représentation"
|
||||
"ch_coa_5831","Car Fees","5831","expense","False","","Autospesen","Costi auto","Frais de voiture"
|
||||
"ch_coa_5832","Other Fees","5832","expense","False","","Andere Spesen","Altri costi","Autres frais"
|
||||
"ch_coa_5840","Indemnities","5840","expense","False","","Entschädigungen","Indennità","Indemnités"
|
||||
"ch_coa_5890","Rate of personal use","5890","expense","False","","Anteil der privaten Nutzung","Tasso uso personale","Taux d’utilisation personnelle"
|
||||
"ch_coa_5891","Compensation company car use","5891","expense","False","","Entschädigung für die Nutzung des Firmenfahrzeugs","Compensazione uso veicolo aziendale","Compensation pour l’usage du véhicule de société"
|
||||
"ch_coa_5900","Temporary staff expenditures","5900","expense","False","","Leistungen DritterAusgaben für Zeitarbeitskräfte","Spese per il personale temporaneo","Charges de personnels temporaires"
|
||||
"ch_coa_6000","Rent","6000","expense","False","","Miete","Costi dei locali","Charges de locaux"
|
||||
"ch_coa_6100","Maintenance & repair expenses","6100","expense","False","","Kosten für Wartung und Reparatur","Manutenzioni, riparazioni e sostituzione immobilizzazioni mobiliari","Entretien, réparations et remplacement des inst. servant à l’exploitation"
|
||||
"ch_coa_6105","Leasing movable tangible fixed assets","6105","expense","False","","Leasing von beweglichen Sachanlagen","Leasing di immobilizzazioni materiali mobiliari","Leasing immobilisations corporelles meubles"
|
||||
"ch_coa_6200","Vehicle expenses","6200","expense","False","","Fahrzeugkosten","Costi auto e di trasporto","Charges de véhicules et de transport"
|
||||
"ch_coa_6260","Vehicules leasing and renting","6260","expense","False","","Fahrzeugleasing und -vermietung","Leasing e noleggio auto","Leasing et location de véhicules"
|
||||
"ch_coa_6300","Insurance premiums","6300","expense","False","","Versicherungsprämien","Assicurazioni - Dazi, tasse, autorizzazioni","Assurances-choses, droits, taxes, autorisations"
|
||||
"ch_coa_6400","Energy expenses & disposal expenses","6400","expense","False","","Energie- und Entsorgungsaufwand","Costi energia e smaltimento","Charges d’énergie et évacuation des déchets"
|
||||
"ch_coa_6500","Administration expenses","6500","expense","False","","Verwaltungskosten","Costi amministrativi","Charges d‘administration"
|
||||
"ch_coa_6570","IT leasing","6570","expense","False","","IT Leasing","Costi informatici incluso leasing","Charges et leasing d’informatique"
|
||||
"ch_coa_6600","Promotion and advertising expenses","6600","expense","False","","Werbeaufwand","Costi pubblicitari","Publicité"
|
||||
"ch_coa_6700","Other operating expenses","6700","expense","False","","Sonstige betriebliche Aufwendungen","Altri costi d’esercizio","Autres charges d‘exploitation"
|
||||
"ch_coa_6800","Depreciations","6800","expense","False","","Abschreibung","Ammortamenti e rettifiche di valore dell’attivo fisso","Amortissements et ajustements de valeur des postes sur immobilisations corporelles"
|
||||
"ch_coa_6900","Financial expenses (Interest expenses, Securities expenses, Participations expenses)","6900","expense","False","","Finanzaufwand (Zinsaufwand, Wertpapieraufwand, Beteiligungsaufwand)","Costi finanziari","Charges financières"
|
||||
"ch_coa_6950","Financial revenues (Interest revenues, Securities revenues, Participations revenues)","6950","expense","False","","Finanzerträge (Zinserträge, Wertpapiererträge, Beteiligungserträge)","Ricavi finanziari","Produits financiers"
|
||||
"ch_coa_7000","Non-core business revenues","7000","income","False","","Erträge aus Nicht-Kerngeschäft","Ricavi attività accessoria","Produits accessoires"
|
||||
"ch_coa_7010","Non-core business expenses","7010","expense","False","","Nicht zum Kerngeschäft gehörende Ausgaben","Costi attività accessoria","Charges accessoires"
|
||||
"ch_coa_7500","Revenues from operational real estate","7500","income","False","","Erlöse aus betrieblichen Liegenschaften","Ricavi immobili aziendali","Produits des immeubles d‘exploitation"
|
||||
"ch_coa_7510","Expenses from operational real estate","7510","expense","False","","Aufwand betriebliche Liegenschaft","Costi immobili aziendali","Charges des immeubles d‘exploitation"
|
||||
"ch_coa_8000","Non-operational expenses","8000","expense","False","","Nichtbetriebliche Aufwendungen","Costi estranei","Charges hors exploitation"
|
||||
"ch_coa_8100","Non-operational revenues","8100","income","False","","Betriebsfremde Erträge","Ricavi estranei","Produits hors exploitation"
|
||||
"ch_coa_8500","Extraordinary expenses","8500","expense","False","","Außerordentliche Ausgaben","Costi straordinari, unici o relativi ad altri periodi contabili","Charges extraordinaires, exceptionnelles ou hors période"
|
||||
"ch_coa_8510","Extraordinary revenues","8510","income","False","","Außerordentliche Ausgaben","Ricavi straordinari, unici o relativi ad altri periodi contabili","Produits extraordinaires, exceptionnels ou hors période"
|
||||
"ch_coa_8900","Direct Taxes","8900","expense","False","","Direkte Steuern","Imposte dirette","Impôts directs"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
"id","name","auto_apply","country_group_id","sequence","name@de","country_id"
|
||||
"fiscal_position_template_1","Suisse national (+Liechtenstein)","1","base.ch_and_li","10","",""
|
||||
"fiscal_position_template_import","Import/Export","1","","20","Import/Export",""
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
"id","name","description","invoice_label","amount","amount_type","type_tax_use","tax_group_id","sequence","active","children_tax_ids","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/tag_ids","repartition_line_ids/account_id","description@de","description@it","description@fr","price_include_override","fiscal_position_ids","original_tax_ids"
|
||||
"vat_25","2.5%","","2.5%","2.5","percent","sale","tax_group_tva_25","","False","","base","invoice","312a","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","312b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","312a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","312b","ch_coa_2200","","","","","",""
|
||||
"vat_25_purchase","2.5%","","2.5%","2.5","percent","purchase","tax_group_tva_25","","False","","base","invoice","","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_25_invest","2.5% I OE","2.5% on invest. and others expenses","2.5% invest.","2.5","percent","purchase","tax_group_tva_25","","False","","base","invoice","","","VST 2.5% Inv./übr.BA (exkl. MWST)","IVA 2.5% Investimenti e altri costi (TR)","TVA 2.5% sur invest. et autres ch. (TR)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_37","3.7%","","3.7%","3.7","percent","sale","tax_group_tva_37","","False","","base","invoice","342a","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","342b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","342a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","342b","ch_coa_2200","","","","","",""
|
||||
"vat_37_purchase","3.7%","","3.7%","3.7","percent","purchase","tax_group_tva_37","","False","","base","invoice","","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_37_invest","3.7% I OE","3.7% on invest. and others expenses","3.7% invest.","3.7","percent","purchase","tax_group_tva_37","","False","","base","invoice","","","VST 3.7% Inv./übr.BA (exkl. MWST)","IVA 3,7% su investimenti e altre voci (TS)","TVA 3.7% sur invest. et autres ch. (TS)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_77","7.7%","","7.7%","7.7","percent","sale","tax_group_tva_77","0","False","","base","invoice","302a","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","302b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","302a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","302b","ch_coa_2200","","","","","",""
|
||||
"vat_77_invest","7.7% I OE","7.7% on invest. and others expenses","7.7% invest.","7.7","percent","purchase","tax_group_tva_77","","False","","base","invoice","","","VST 7.7% Inv./übr.BA (exkl. MWST)","IVA 7,7% su investimenti e altre voci (TN)","TVA 7.7% sur invest. et autres ch. (TN)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_XO","0% EX","Export","0%","0.0","percent","sale","tax_group_tva_0","","True","","base","invoice","220","","0% Export","IVA dovuta 0% (Export)","TVA due a 0% (Exportations)","","fiscal_position_template_import","vat_37,vat_sale_38,vat_77,vat_25,vat_sale_26,vat_sale_81"
|
||||
"","","","","","","","","","","","tax","invoice","","","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","220","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","","","","","",""
|
||||
"vat_O_exclude","0% EXC","Exclude","0% excl.","0.0","percent","sale","tax_group_tva_0","","True","","base","invoice","230","","0% Ausgenommen","IVA 0% Esclusa","TVA 0% exclue","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","","","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","230","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","","","","","",""
|
||||
"vat_O_import","0% EX","Import","0% import","0.0","percent","purchase","tax_group_tva_0","","True","","base","invoice","","","0% Import","IVA 0% Importazioni di bene e servizi","TVA 0% Importations de biens et services","","fiscal_position_template_import","vat_purchase_38_invest,vat_37_invest,vat_purchase_81_invest,vat_25_invest,vat_purchase_81_reverse,vat_37_purchase,vat_purchase_26_invest,vat_25_purchase,vat_purchase_38,vat_77_purchase_reverse,vat_77_invest,vat_purchase_26"
|
||||
"","","","","","","","","","","","tax","invoice","","","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","","","","","",""
|
||||
"vat_100_import","100% GS","Customs VAT on goods and services","100% imp.","100.0","division","purchase","tax_group_tva_100","","True","","base","invoice","","","Zoll Mehrwertsteuer auf Waren und Dienstleistungen","Liquidazione IVA al 100%","","tax_included","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_100_import_invest","100% I OE","Customs VAT on invest. and others expenses","100% imp. invest.","100.0","division","purchase","tax_group_tva_100","","True","","base","invoice","","","Zoll Mehrwertsteuer auf Investitionen und andere Ausgaben","100 % iva dogana","Dédouanement TVA (invest. et autres ch.)","tax_included","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_77_purchase_return","7.7% R","7.7% Sales (reverse)","7.7% return","-7.7","percent","none","tax_group_tva_77","0","False","","base","invoice","382a","","UST 7.7% Bezugssteuer","IVA dovuta al 7,7% (TN) (rendimento)","TVA due a 7.7% (TN) (return)","tax_excluded","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","382b","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","382a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","382b","ch_coa_1170","","","","","",""
|
||||
"vat_77_purchase","7.7%","","7.7%","7.7","percent","purchase","tax_group_tva_77","0","False","","base","invoice","","","","","","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_77_purchase_reverse","7.7% R C","7.7% on purchase of service abroad (reverse charge)","7.7% reverse","","group","purchase","tax_group_tva_77","","False","vat_77_purchase_return,vat_77_purchase","","","","","BZS 7.7% Bezugssteuer","IVA 7,7% sull'acquisto di servizi all'estero (reverse charge)","TVA 7.7% sur achat service a l'etranger (reverse charge)","","fiscal_position_template_1",""
|
||||
"vat_other_movements_900","0% S T","0% - Subsidies, tourist taxes","0% subventions","0.0","percent","sale","tax_group_tva_0","","True","","base","invoice","900","","0% - Subventionen, Kurtaxen","Sovvenzioni, 0% tasse turistiche","Subventions, taxes touristiques à 0%","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","","","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","900","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","","","","","",""
|
||||
"vat_other_movements_910","0% D","0% - Donations, dividends, compensation","0% dons","0.0","percent","sale","tax_group_tva_0","","True","","base","invoice","910","","0% - Schenkungen, Dividenden, Entschädigungen","Donazioni, dividendi, compensi a 0%","Dons, dividendes, dédommagements à 0%","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","","","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","910","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","","","","","",""
|
||||
"vat_sale_26","2.6%","2.6% Sales","2.6%","2.6","percent","sale","tax_group_vat_26","","True","","base","invoice","313a","","UST 2,6% Lief./DL (exkl. MWST)","IVA dovuta al 2,6% (TR)","TVA due à 2,6% (TR)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","313b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","313a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","313b","ch_coa_2200","","","","","",""
|
||||
"vat_purchase_26","2.6%","2.6% on goods and services","2.6%","2.6","percent","purchase","tax_group_vat_26","","True","","base","invoice","","","VST 2,6% Mat.-/DL (exkl. MWST)","IVA 2,6% sull'acquisto di B&S (TR)","TVA 2,6% sur achat B&S (TR)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_purchase_26_invest","2.6% I OE","2.6% on invest. and others expenses","2.6% invest.","2.6","percent","purchase","tax_group_vat_26","","True","","base","invoice","","","VST 2,6% Inv./übr.BA (exkl. MWST)","IVA 2,6% Investimenti e altri costi (TR)","TVA 2,6% sur invest. et autres ch. (TR)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_sale_38","3.8%","3.8% Sales","3.8%","3.8","percent","sale","tax_group_vat_38","","True","","base","invoice","343a","","UST 3,8% Lief./DL (exkl. MWST)","IVA dovuta al 3,8% (TS)","TVA due à 3,8% (TS)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","343b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","343a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","343b","ch_coa_2200","","","","","",""
|
||||
"vat_purchase_38","3.8%","3.8% purchase on goods and services","3.8%","3.8","percent","purchase","tax_group_vat_38","","True","","base","invoice","","","VST 3,8% Mat.-/DL (exkl. MWST)","IVA 3,8% sull'acquisto di B&S (TS)","TVA 3,8% sur achat B&S (TS)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_purchase_38_invest","3.8% I OE","3.8% on invest. and others expenses","3.8% invest.","3.8","percent","purchase","tax_group_vat_38","","True","","base","invoice","","","VST 3,8% Inv./übr.BA (exkl. MWST)","IVA 3,8% su investimenti e altre voci (TS)","TVA 3,8% sur invest. et autres ch. (TS)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_sale_81","8.1%","8.1% Sales","8.1%","8.1","percent","sale","tax_group_vat_81","1","True","","base","invoice","303a","","UST 8,1% Lief./DL (exkl. MWST)","IVA dovuta al 8,1% (TN)","TVA due à 8,1% (TN)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","303b","ch_coa_2200","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","303a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","303b","ch_coa_2200","","","","","",""
|
||||
"vat_purchase_81","8.1%","8.1% on goods and services","8.1%","8.1","percent","purchase","tax_group_vat_81","1","True","","base","invoice","","","VST 8,1% Mat.-/DL (exkl. MWST)","IVA 8,1% sull'acquisto di B&S (TN)","TVA 8,1% sur achat B&S (TN)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","400","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","400","ch_coa_1170","","","","","",""
|
||||
"vat_purchase_81_invest","8.1% I OE","8.1% on invest. and others expenses","8.1% invest.","8.1","percent","purchase","tax_group_vat_81","","True","","base","invoice","","","VST 8,1% Inv./übr.BA (exkl. MWST)","IVA 8,1% su investimenti e altre voci (TN)","TVA 8,1% sur invest. et autres ch. (TN)","","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","405","ch_coa_1171","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","405","ch_coa_1171","","","","","",""
|
||||
"vat_purchase_81_return","8.1% R","8.1% Sales (return)","8.1% return","-8.1","percent","none","tax_group_vat_81","0","True","","base","invoice","383a","","UST 8,1% Bezugssteuer","IVA dovuta al 8,1% (TN) (rendimento)","TVA due à 8,1% (TN) (return)","tax_excluded","fiscal_position_template_1",""
|
||||
"","","","","","","","","","","","tax","invoice","383b","ch_coa_1170","","","","","",""
|
||||
"","","","","","","","","","","","base","refund","383a","","","","","","",""
|
||||
"","","","","","","","","","","","tax","refund","383b","ch_coa_1170","","","","","",""
|
||||
"vat_purchase_81_reverse","8.1% R C","8.1% on purchase of service abroad (reverse charge)","8.1% reverse","","group","purchase","tax_group_vat_81","","True","vat_purchase_81_return,vat_purchase_81","","","","","BZS 8,1% Bezugssteuer","IVA 8,1% sull'acquisto di servizi all'estero (reverse charge)","TVA 8,1% sur achat service a l'étranger (reverse charge)","","fiscal_position_template_1",""
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
"id","name","country_id","tax_payable_account_id","tax_receivable_account_id","name@de","name@fr","name@it"
|
||||
"tax_group_tva_0","VAT 0%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 0%","TVA 0%","IVA 0%"
|
||||
"tax_group_tva_25","VAT 2.5%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 2,5%","TVA 2,5%","IVA 2,5%"
|
||||
"tax_group_tva_37","VAT 3.7%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 3,7%","TVA 3,7%","IVA 3,7%"
|
||||
"tax_group_tva_77","VAT 7.7%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 7,7%","TVA 7,7%","IVA 7,7%"
|
||||
"tax_group_tva_100","VAT 100%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 100%","TVA 100%","IVA 100%"
|
||||
"tax_group_vat_26","VAT 2.6%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 2,6%","TVA 2,6%","IVA 2,6%"
|
||||
"tax_group_vat_38","VAT 3.8%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 3,8%","TVA 3,8%","IVA 3,8%"
|
||||
"tax_group_vat_81","VAT 8.1%","base.ch","ch_coa_2201","ch_coa_1176","MwSt. 8,1%","TVA 8,1%","IVA 8,1%"
|
||||
|
|
|
@ -1,40 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="partner_demo_company_ch" model="res.partner">
|
||||
<record id="base.partner_demo_company_ch" model="res.partner" forcecreate="1">
|
||||
<field name="name">CH Company</field>
|
||||
<field name="vat">CHE-530781296TVA</field>
|
||||
<field name="street">14 Meierskappelerstrasse</field>
|
||||
<field name="street">Meierskappelerstrasse 14</field>
|
||||
<field name="city">Risch-Rotkreuz</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
|
||||
|
||||
<field name="zip">6343</field>
|
||||
<field name="phone">+41 78 123 45 67</field>
|
||||
<field name="email">info@company.chexample.com</field>
|
||||
<field name="website">www.chexample.com</field>
|
||||
<field name="is_company" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record id="partner_demo_company_bank_account" model="res.partner.bank">
|
||||
<record id="base.demo_bank_ch" model="res.partner.bank" forcecreate="1">
|
||||
<field name="acc_type">iban</field>
|
||||
<field name="acc_number">CH4431999123000889012</field>
|
||||
<field name="partner_id" ref="l10n_ch.partner_demo_company_ch"/>
|
||||
<field name="acc_number">CH1500240123456789012</field>
|
||||
<field name="l10n_ch_qr_iban">CH4431999123000889012</field>
|
||||
<field name="partner_id" ref="base.partner_demo_company_ch"/>
|
||||
<field name="allow_out_payment" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record id="demo_company_ch" model="res.company">
|
||||
<record id="base.demo_company_ch" model="res.company" forcecreate="1">
|
||||
<field name="name">CH Company</field>
|
||||
<field name="partner_id" ref="partner_demo_company_ch"/>
|
||||
<field name="partner_id" ref="base.partner_demo_company_ch"/>
|
||||
</record>
|
||||
|
||||
<function model="res.company" name="_onchange_country_id">
|
||||
<value eval="[ref('demo_company_ch')]"/>
|
||||
<value eval="[ref('base.demo_company_ch')]"/>
|
||||
</function>
|
||||
|
||||
<function model="res.users" name="write">
|
||||
<value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
|
||||
<value eval="{'company_ids': [(4, ref('l10n_ch.demo_company_ch'))]}"/>
|
||||
<value eval="{'company_ids': [(4, ref('base.demo_company_ch'))]}"/>
|
||||
</function>
|
||||
|
||||
<function model="account.chart.template" name="try_loading">
|
||||
<value eval="[ref('l10n_ch.l10nch_chart_template')]"/>
|
||||
<value model="res.company" eval="obj().env.ref('l10n_ch.demo_company_ch')"/>
|
||||
<value eval="[]"/>
|
||||
<value>ch</value>
|
||||
<value model="res.company" eval="obj().env.ref('base.demo_company_ch')"/>
|
||||
<value name="install_demo" eval="True"/>
|
||||
</function>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<field name="city">Lausanne</field>
|
||||
<field name="zip">1004</field>
|
||||
<field name="country_id" ref="base.ch"/>
|
||||
<field name="street">Rte de Prilly 18, 1004 Lausanne, Suisse</field>
|
||||
<field name="street">Rte de Prilly 18</field>
|
||||
<field name="email">info@easycleanlausanne.ch</field>
|
||||
<field name="phone">+41 21 796 73 24</field>
|
||||
<field name="website">http://www.easycleanlausanne.ch</field>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +1,12 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import api, SUPERUSER_ID
|
||||
from odoo.addons.account.models.chart_template import update_taxes_from_templates
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
# We had corrupted data, handle the correction so the tax update can proceed.
|
||||
# See https://github.com/odoo/odoo/commit/7b07df873535446f97abc1de9176b9332de5cb07
|
||||
for company in env.companies:
|
||||
for company in env['res.company'].search([('chart_template', '=', 'ch')], order="parent_path"):
|
||||
# We had corrupted data, handle the correction so the tax update can proceed.
|
||||
# See https://github.com/odoo/odoo/commit/7b07df873535446f97abc1de9176b9332de5cb07
|
||||
taxes_to_check = (f'{company.id}_vat_purchase_81_reverse', f'{company.id}_vat_77_purchase_reverse')
|
||||
tax_ids = env['ir.model.data'].search([
|
||||
('name', 'in', taxes_to_check),
|
||||
|
|
@ -19,5 +18,4 @@ def migrate(cr, version):
|
|||
# set the child to it's parent's value
|
||||
child.type_tax_use = tax.type_tax_use
|
||||
|
||||
# Update taxes
|
||||
update_taxes_from_templates(cr, 'l10n_ch.l10nch_chart_template')
|
||||
env['account.chart.template'].try_loading('ch', company, force_create=False)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
for company in env["res.company"].search([("chart_template", "=", "ch")], order="parent_path"):
|
||||
env["account.chart.template"].try_loading("ch", company)
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import odoo
|
||||
from odoo.modules.registry import Registry
|
||||
|
||||
def migrate(cr, version):
|
||||
registry = odoo.registry(cr.dbname)
|
||||
registry = Registry(cr.dbname)
|
||||
from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
|
||||
migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_ch')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import res_config_settings
|
||||
from . import template_ch
|
||||
from . import account_invoice
|
||||
from . import account_journal
|
||||
from . import res_bank
|
||||
from . import res_company
|
||||
from . import account_bank_statement
|
||||
from . import ir_actions_report
|
||||
from . import chart_template
|
||||
from . import account_payment
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.addons.l10n_ch.models.res_bank import _is_l10n_ch_postal
|
||||
from odoo.tools.misc import str2bool
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
|
||||
_inherit = "account.bank.statement.line"
|
||||
|
||||
def _find_or_create_bank_account(self):
|
||||
if self.company_id.account_fiscal_country_id.code in ('CH', 'LI') and _is_l10n_ch_postal(self.account_number):
|
||||
bank_account = self.env['res.partner.bank'].search(
|
||||
[('company_id', '=', self.company_id.id),
|
||||
('sanitized_acc_number', 'like', self.account_number + '%'),
|
||||
('partner_id', '=', self.partner_id.id)])
|
||||
if not bank_account and not str2bool(
|
||||
self.env['ir.config_parameter'].sudo().get_param("account.skip_create_bank_account_on_reconcile")
|
||||
):
|
||||
bank_account = self.env['res.partner.bank'].create({
|
||||
'company_id': self.company_id.id,
|
||||
'acc_number': self.account_number + " " + self.partner_id.name,
|
||||
'partner_id': self.partner_id.id
|
||||
})
|
||||
return bank_account
|
||||
else:
|
||||
return super()._find_or_create_bank_account()
|
||||
|
|
@ -4,342 +4,74 @@ import re
|
|||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tools.float_utils import float_split_str
|
||||
from odoo.tools.misc import mod10r
|
||||
|
||||
l10n_ch_ISR_NUMBER_LENGTH = 27
|
||||
l10n_ch_ISR_ID_NUM_LENGTH = 6
|
||||
L10N_CH_QRR_NUMBER_LENGTH = 27
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
# NOTE
|
||||
# The ISR system is kept and taken into account up to September 2022.
|
||||
# After that, the transition to the QR system will be completed and the ISR system won't exist anymore.
|
||||
# This means that Odoo v16 shouldn't support the ISR system and all the references to it should be cleaned up by then.
|
||||
# In the versions leading to that change,
|
||||
# although the functions related to the ISR are still taken into account and still exist,
|
||||
# the QR billing is always preferred.
|
||||
|
||||
_inherit = 'account.move'
|
||||
|
||||
l10n_ch_isr_subscription = fields.Char(compute='_compute_l10n_ch_isr_subscription', help='ISR subscription number identifying your company or your bank to generate ISR.')
|
||||
l10n_ch_isr_subscription_formatted = fields.Char(compute='_compute_l10n_ch_isr_subscription', help="ISR subscription number your company or your bank, formated with '-' and without the padding zeros, to generate ISR report.")
|
||||
|
||||
l10n_ch_isr_number = fields.Char(compute='_compute_l10n_ch_isr_number', store=True, help='The reference number associated with this invoice')
|
||||
l10n_ch_isr_number_spaced = fields.Char(compute='_compute_l10n_ch_isr_number_spaced', help="ISR number split in blocks of 5 characters (right-justified), to generate ISR report.")
|
||||
|
||||
l10n_ch_isr_optical_line = fields.Char(compute="_compute_l10n_ch_isr_optical_line", help='Optical reading line, as it will be printed on ISR')
|
||||
|
||||
l10n_ch_isr_valid = fields.Boolean(compute='_compute_l10n_ch_isr_valid', help='Boolean value. True iff all the data required to generate the ISR are present')
|
||||
|
||||
l10n_ch_isr_sent = fields.Boolean(default=False, help="Boolean value telling whether or not the ISR corresponding to this invoice has already been printed or sent by mail.")
|
||||
l10n_ch_currency_name = fields.Char(related='currency_id.name', readonly=True, string="Currency Name", help="The name of this invoice's currency") #This field is used in the "invisible" condition field of the 'Print ISR' button.
|
||||
l10n_ch_isr_needs_fixing = fields.Boolean(compute="_compute_l10n_ch_isr_needs_fixing", help="Used to show a warning banner when the vendor bill needs a correct ISR payment reference. ")
|
||||
|
||||
l10n_ch_is_qr_valid = fields.Boolean(compute='_compute_l10n_ch_qr_is_valid', help="Determines whether an invoice can be printed as a QR or not")
|
||||
|
||||
@api.depends('partner_id', 'currency_id')
|
||||
def _compute_l10n_ch_qr_is_valid(self):
|
||||
for move in self:
|
||||
company_eligible = True
|
||||
|
||||
if(move.company_id.account_fiscal_country_id.code != 'CH'):
|
||||
company_eligible = False
|
||||
|
||||
if move.partner_bank_id.acc_number and move.partner_bank_id.acc_type == 'iban':
|
||||
iban = move.partner_bank_id.acc_number.replace(' ', '')
|
||||
if iban.startswith('CH') and len(iban) >= 9:
|
||||
bank_code = iban[4:9]
|
||||
if bank_code.isdigit() and 30000 <= int(bank_code) <= 31999:
|
||||
company_eligible = True
|
||||
|
||||
error_messages = move.partner_bank_id._get_error_messages_for_qr('ch_qr', move.partner_id, move.currency_id)
|
||||
move.l10n_ch_is_qr_valid = (
|
||||
move.move_type == 'out_invoice'
|
||||
and move.partner_bank_id._eligible_for_qr_code('ch_qr', move.partner_id, move.currency_id, raises_error=False)
|
||||
and company_eligible
|
||||
move.move_type == 'out_invoice' and
|
||||
not error_messages and
|
||||
(
|
||||
# QR codes must be printed on all Swiss transactions
|
||||
move.company_id.account_fiscal_country_id.code == 'CH' or
|
||||
(
|
||||
# QR code is also printed if the fiscal country is not Switzerland but the receivale account is eligible
|
||||
move.partner_bank_id.acc_type == 'iban' and
|
||||
(iban := (move.partner_bank_id.acc_number or '').replace(' ', '')).startswith('CH') and
|
||||
iban[4:9].isdigit() and
|
||||
30000 <= int(iban[4:9]) <= 31999
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@api.depends('partner_bank_id.l10n_ch_isr_subscription_eur', 'partner_bank_id.l10n_ch_isr_subscription_chf')
|
||||
def _compute_l10n_ch_isr_subscription(self):
|
||||
""" Computes the ISR subscription identifying your company or the bank that allows to generate ISR. And formats it accordingly"""
|
||||
def _format_isr_subscription(isr_subscription):
|
||||
#format the isr as per specifications
|
||||
currency_code = isr_subscription[:2]
|
||||
middle_part = isr_subscription[2:-1]
|
||||
trailing_cipher = isr_subscription[-1]
|
||||
middle_part = re.sub('^0*', '', middle_part)
|
||||
return currency_code + '-' + middle_part + '-' + trailing_cipher
|
||||
|
||||
def _format_isr_subscription_scanline(isr_subscription):
|
||||
# format the isr for scanline
|
||||
return isr_subscription[:2] + isr_subscription[2:-1].rjust(6, '0') + isr_subscription[-1:]
|
||||
|
||||
for record in self:
|
||||
record.l10n_ch_isr_subscription = False
|
||||
record.l10n_ch_isr_subscription_formatted = False
|
||||
if record.partner_bank_id:
|
||||
if record.currency_id.name == 'EUR':
|
||||
isr_subscription = record.partner_bank_id.l10n_ch_isr_subscription_eur
|
||||
elif record.currency_id.name == 'CHF':
|
||||
isr_subscription = record.partner_bank_id.l10n_ch_isr_subscription_chf
|
||||
else:
|
||||
#we don't format if in another currency as EUR or CHF
|
||||
continue
|
||||
|
||||
if isr_subscription:
|
||||
isr_subscription = isr_subscription.replace("-", "") # In case the user put the -
|
||||
record.l10n_ch_isr_subscription = _format_isr_subscription_scanline(isr_subscription)
|
||||
record.l10n_ch_isr_subscription_formatted = _format_isr_subscription(isr_subscription)
|
||||
|
||||
def _get_isrb_id_number(self):
|
||||
"""Hook to fix the lack of proper field for ISR-B Customer ID"""
|
||||
# FIXME
|
||||
# replace l10n_ch_postal by an other field to not mix ISR-B
|
||||
# customer ID as it forbid the following validations on l10n_ch_postal
|
||||
# number for Vendor bank accounts:
|
||||
# - validation of format xx-yyyyy-c
|
||||
# - validation of checksum
|
||||
return self.partner_bank_id.l10n_ch_postal or ''
|
||||
|
||||
@api.depends('name', 'partner_bank_id.l10n_ch_postal')
|
||||
def _compute_l10n_ch_isr_number(self):
|
||||
for record in self:
|
||||
if (record.partner_bank_id.l10n_ch_qr_iban or record.l10n_ch_isr_subscription) and record.name:
|
||||
invoice_ref = re.sub(r'\D', '', record.name)
|
||||
record.l10n_ch_isr_number = record._compute_isr_number(invoice_ref)
|
||||
else:
|
||||
record.l10n_ch_isr_number = False
|
||||
|
||||
@api.model
|
||||
def _compute_isr_number(self, invoice_ref):
|
||||
r"""Generates the ISR or QRR reference
|
||||
|
||||
An ISR references are 27 characters long.
|
||||
QRR is a recycling of ISR for QR-bills. Thus works the same.
|
||||
def 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).
|
||||
|
||||
There are 2 types of references:
|
||||
|
||||
* ISR (Postfinance)
|
||||
|
||||
The reference is free but for the last
|
||||
digit which is a checksum.
|
||||
If shorter than 27 digits, it is filled with zeros on the left.
|
||||
|
||||
e.g.
|
||||
|
||||
120000000000234478943216899
|
||||
\________________________/|
|
||||
1 2
|
||||
(1) 12000000000023447894321689 | reference
|
||||
(2) 9: control digit for identification number and reference
|
||||
|
||||
* ISR-B (Indirect through a bank, requires a customer ID)
|
||||
|
||||
In case of ISR-B The firsts digits (usually 6), contain the customer ID
|
||||
at the Bank of this ISR's issuer.
|
||||
The rest (usually 20 digits) is reserved for the reference plus the
|
||||
control digit.
|
||||
If the [customer ID] + [the reference] + [the control digit] is shorter
|
||||
than 27 digits, it is filled with zeros between the customer ID till
|
||||
the start of the reference.
|
||||
|
||||
e.g.
|
||||
|
||||
150001123456789012345678901
|
||||
\____/\__________________/|
|
||||
1 2 3
|
||||
(1) 150001 | id number of the customer (size may vary)
|
||||
(2) 12345678901234567890 | reference
|
||||
(3) 1: control digit for identification number and reference
|
||||
"""
|
||||
id_number = self._get_isrb_id_number()
|
||||
if id_number:
|
||||
id_number = id_number.zfill(l10n_ch_ISR_ID_NUM_LENGTH)
|
||||
self.ensure_one()
|
||||
if self.partner_bank_id.l10n_ch_qr_iban and self.l10n_ch_is_qr_valid and self.name:
|
||||
invoice_ref = re.sub(r'[^\d]', '', self.name)
|
||||
return self._compute_qrr_number(invoice_ref)
|
||||
else:
|
||||
return False
|
||||
|
||||
@api.model
|
||||
def _compute_qrr_number(self, invoice_ref):
|
||||
# keep only the last digits if it exceed boundaries
|
||||
full_len = len(id_number) + len(invoice_ref)
|
||||
ref_payload_len = l10n_ch_ISR_NUMBER_LENGTH - 1
|
||||
extra = full_len - ref_payload_len
|
||||
ref_payload_len = L10N_CH_QRR_NUMBER_LENGTH - 1
|
||||
extra = len(invoice_ref) - ref_payload_len
|
||||
if extra > 0:
|
||||
invoice_ref = invoice_ref[extra:]
|
||||
internal_ref = invoice_ref.zfill(ref_payload_len - len(id_number))
|
||||
|
||||
return mod10r(id_number + internal_ref)
|
||||
|
||||
@api.depends('l10n_ch_isr_number')
|
||||
def _compute_l10n_ch_isr_number_spaced(self):
|
||||
def _space_isr_number(isr_number):
|
||||
to_treat = isr_number
|
||||
res = ''
|
||||
while to_treat:
|
||||
res = to_treat[-5:] + res
|
||||
to_treat = to_treat[:-5]
|
||||
if to_treat:
|
||||
res = ' ' + res
|
||||
return res
|
||||
|
||||
for record in self:
|
||||
if record.l10n_ch_isr_number:
|
||||
record.l10n_ch_isr_number_spaced = _space_isr_number(record.l10n_ch_isr_number)
|
||||
else:
|
||||
record.l10n_ch_isr_number_spaced = False
|
||||
|
||||
def _get_l10n_ch_isr_optical_amount(self):
|
||||
"""Prepare amount string for ISR optical line"""
|
||||
self.ensure_one()
|
||||
currency_code = None
|
||||
if self.currency_id.name == 'CHF':
|
||||
currency_code = '01'
|
||||
elif self.currency_id.name == 'EUR':
|
||||
currency_code = '03'
|
||||
units, cents = float_split_str(self.amount_residual, 2)
|
||||
amount_to_display = units + cents
|
||||
amount_ref = amount_to_display.zfill(10)
|
||||
optical_amount = currency_code + amount_ref
|
||||
optical_amount = mod10r(optical_amount)
|
||||
return optical_amount
|
||||
|
||||
@api.depends(
|
||||
'currency_id.name', 'amount_residual', 'name',
|
||||
'partner_bank_id.l10n_ch_isr_subscription_eur',
|
||||
'partner_bank_id.l10n_ch_isr_subscription_chf')
|
||||
def _compute_l10n_ch_isr_optical_line(self):
|
||||
r""" Compute the optical line to print on the bottom of the ISR.
|
||||
|
||||
This line is read by an OCR.
|
||||
It's format is:
|
||||
|
||||
amount>reference+ creditor>
|
||||
|
||||
Where:
|
||||
|
||||
- amount: currency and invoice amount
|
||||
- reference: ISR structured reference number
|
||||
- in case of ISR-B contains the Customer ID number
|
||||
- it can also contains a partner reference (of the debitor)
|
||||
- creditor: Subscription number of the creditor
|
||||
|
||||
An optical line can have the 2 following formats:
|
||||
|
||||
* ISR (Postfinance)
|
||||
|
||||
0100003949753>120000000000234478943216899+ 010001628>
|
||||
|/\________/| \________________________/| \_______/
|
||||
1 2 3 4 5 6
|
||||
|
||||
(1) 01 | currency
|
||||
(2) 0000394975 | amount 3949.75
|
||||
(3) 4 | control digit for amount
|
||||
(5) 12000000000023447894321689 | reference
|
||||
(6) 9: control digit for identification number and reference
|
||||
(7) 010001628: subscription number (01-162-8)
|
||||
|
||||
* ISR-B (Indirect through a bank, requires a customer ID)
|
||||
|
||||
0100000494004>150001123456789012345678901+ 010234567>
|
||||
|/\________/| \____/\__________________/| \_______/
|
||||
1 2 3 4 5 6 7
|
||||
|
||||
(1) 01 | currency
|
||||
(2) 0000049400 | amount 494.00
|
||||
(3) 4 | control digit for amount
|
||||
(4) 150001 | id number of the customer (size may vary, usually 6 chars)
|
||||
(5) 12345678901234567890 | reference
|
||||
(6) 1: control digit for identification number and reference
|
||||
(7) 010234567: subscription number (01-23456-7)
|
||||
"""
|
||||
for record in self:
|
||||
record.l10n_ch_isr_optical_line = ''
|
||||
if record.l10n_ch_isr_number and record.l10n_ch_isr_subscription and record.currency_id.name:
|
||||
# Final assembly (the space after the '+' is no typo, it stands in the specs.)
|
||||
record.l10n_ch_isr_optical_line = '{amount}>{reference}+ {creditor}>'.format(
|
||||
amount=record._get_l10n_ch_isr_optical_amount(),
|
||||
reference=record.l10n_ch_isr_number,
|
||||
creditor=record.l10n_ch_isr_subscription,
|
||||
)
|
||||
|
||||
@api.depends(
|
||||
'move_type', 'name', 'currency_id.name',
|
||||
'partner_bank_id.l10n_ch_isr_subscription_eur',
|
||||
'partner_bank_id.l10n_ch_isr_subscription_chf')
|
||||
def _compute_l10n_ch_isr_valid(self):
|
||||
"""Returns True if all the data required to generate the ISR are present"""
|
||||
for record in self:
|
||||
record.l10n_ch_isr_valid = record.move_type == 'out_invoice' and\
|
||||
record.name and \
|
||||
record.l10n_ch_isr_subscription and \
|
||||
record.l10n_ch_currency_name in ['EUR', 'CHF']
|
||||
|
||||
@api.depends('move_type', 'partner_bank_id', 'payment_reference')
|
||||
def _compute_l10n_ch_isr_needs_fixing(self):
|
||||
for inv in self:
|
||||
if inv.move_type == 'in_invoice' and inv.company_id.account_fiscal_country_id.code in ('CH', 'LI'):
|
||||
partner_bank = inv.partner_bank_id
|
||||
needs_isr_ref = partner_bank.l10n_ch_qr_iban or partner_bank._is_isr_issuer()
|
||||
if needs_isr_ref and not inv._has_isr_ref():
|
||||
inv.l10n_ch_isr_needs_fixing = True
|
||||
continue
|
||||
inv.l10n_ch_isr_needs_fixing = False
|
||||
|
||||
def _has_isr_ref(self):
|
||||
"""Check if this invoice has a valid ISR reference (for Switzerland)
|
||||
e.g.
|
||||
12371
|
||||
000000000000000000000012371
|
||||
210000000003139471430009017
|
||||
21 00000 00003 13947 14300 09017
|
||||
"""
|
||||
self.ensure_one()
|
||||
ref = self.payment_reference or self.ref
|
||||
if not ref:
|
||||
return False
|
||||
ref = ref.replace(' ', '')
|
||||
if re.match(r'^(\d{2,27})$', ref):
|
||||
return ref == mod10r(ref[:-1])
|
||||
return False
|
||||
|
||||
def split_total_amount(self):
|
||||
""" Splits the total amount of this invoice in two parts, using the dot as
|
||||
a separator, and taking two precision digits (always displayed).
|
||||
These two parts are returned as the two elements of a tuple, as strings
|
||||
to print in the report.
|
||||
|
||||
This function is needed on the model, as it must be called in the report
|
||||
template, which cannot reference static functions
|
||||
"""
|
||||
return float_split_str(self.amount_residual, 2)
|
||||
|
||||
def action_invoice_sent(self):
|
||||
# OVERRIDE
|
||||
rslt = super(AccountMove, self).action_invoice_sent()
|
||||
if self.l10n_ch_isr_valid or self.l10n_ch_is_qr_valid:
|
||||
rslt['context']['l10n_ch_mark_isr_as_sent'] = True
|
||||
return rslt
|
||||
|
||||
@api.returns('mail.message', lambda value: value.id)
|
||||
def message_post(self, **kwargs):
|
||||
if self.env.context.get('l10n_ch_mark_isr_as_sent'):
|
||||
self.filtered(lambda inv: not inv.l10n_ch_isr_sent).write({'l10n_ch_isr_sent': True})
|
||||
return super(AccountMove, self.with_context(mail_post_autofollow=self.env.context.get('mail_post_autofollow', True))).message_post(**kwargs)
|
||||
internal_ref = invoice_ref.zfill(ref_payload_len)
|
||||
return mod10r(internal_ref)
|
||||
|
||||
def _get_invoice_reference_ch_invoice(self):
|
||||
""" This sets ISR reference number which is generated based on customer's `Bank Account` and set it as
|
||||
""" This sets QRR reference number which is generated based on customer's `Bank Account` and set it as
|
||||
`Payment Reference` of the invoice when invoice's journal is using Switzerland's communication standard
|
||||
"""
|
||||
self.ensure_one()
|
||||
# l10n_ch_isr_number is not always computed at this stage, and could change value when the invoice is posted.
|
||||
# We manually compute here it to avoid this conflict.
|
||||
self._compute_l10n_ch_isr_number()
|
||||
return self.l10n_ch_isr_number
|
||||
return self.get_l10n_ch_qrr_number()
|
||||
|
||||
def _get_invoice_reference_ch_partner(self):
|
||||
""" This sets ISR reference number which is generated based on customer's `Bank Account` and set it as
|
||||
""" This sets QRR reference number which is generated based on customer's `Bank Account` and set it as
|
||||
`Payment Reference` of the invoice when invoice's journal is using Switzerland's communication standard
|
||||
"""
|
||||
self.ensure_one()
|
||||
return self.l10n_ch_isr_number
|
||||
return self.get_l10n_ch_qrr_number()
|
||||
|
||||
@api.model
|
||||
def space_qrr_reference(self, qrr_ref):
|
||||
|
|
@ -358,7 +90,6 @@ class AccountMove(models.Model):
|
|||
""" Makes the provided SCOR reference human-friendly, spacing its elements
|
||||
by blocks of 5 from right to left.
|
||||
"""
|
||||
|
||||
return ' '.join(iso11649_ref[i:i + 4] for i in range(0, len(iso11649_ref), 4))
|
||||
|
||||
def l10n_ch_action_print_qr(self):
|
||||
|
|
@ -374,7 +105,6 @@ class AccountMove(models.Model):
|
|||
'name': (_("Some invoices could not be printed in the QR format")),
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'l10n_ch.qr_invoice.wizard',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {'active_ids': self.ids},
|
||||
|
|
@ -383,9 +113,7 @@ class AccountMove(models.Model):
|
|||
|
||||
def _l10n_ch_dispatch_invoices_to_print(self):
|
||||
qr_invs = self.filtered('l10n_ch_is_qr_valid')
|
||||
isr_invs = self.filtered('l10n_ch_isr_valid')
|
||||
return {
|
||||
'qr': qr_invs,
|
||||
'isr': isr_invs,
|
||||
'classic': self - qr_invs - isr_invs,
|
||||
'classic': self - qr_invs,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,18 +13,18 @@ class AccountJournal(models.Model):
|
|||
_inherit = 'account.journal'
|
||||
|
||||
invoice_reference_model = fields.Selection(selection_add=[
|
||||
('ch', 'Switzerland')
|
||||
('ch', 'Switzerland (12 34560 00103 88500 1000 19188)')
|
||||
], ondelete={'ch': lambda recs: recs.write({'invoice_reference_model': 'odoo'})})
|
||||
|
||||
def _process_reference_for_sale_order(self, order_reference):
|
||||
'''
|
||||
returns the order reference to be used for the payment respecting the ISR
|
||||
Returns the order reference to be used for the payment, respecting the QRR standard.
|
||||
'''
|
||||
self.ensure_one()
|
||||
if self.invoice_reference_model == 'ch':
|
||||
# converting the sale order name into a unique number. Letters are converted to their base10 value
|
||||
invoice_ref = "".join([a if a.isdigit() else str(ord(a)) for a in order_reference])
|
||||
# id_number = self.company_id.bank_ids.l10n_ch_postal or ''
|
||||
order_reference = self.env['account.move']._compute_isr_number(invoice_ref)
|
||||
order_reference = self.env['account.move']._compute_qrr_number(invoice_ref)
|
||||
return order_reference
|
||||
return super()._process_reference_for_sale_order(order_reference)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
import re
|
||||
|
||||
from odoo import _, models, fields, api
|
||||
from odoo.tools import mod10r
|
||||
|
||||
|
||||
class AccountPayment(models.Model):
|
||||
_inherit = "account.payment"
|
||||
|
||||
l10n_ch_reference_warning_msg = fields.Char(compute='_compute_l10n_ch_reference_warning_msg')
|
||||
|
||||
@api.onchange('partner_id', 'memo', 'payment_type')
|
||||
def _compute_l10n_ch_reference_warning_msg(self):
|
||||
for payment in self:
|
||||
if payment.payment_type == 'outbound' and\
|
||||
payment.partner_id.country_code in ['CH', 'LI'] and\
|
||||
payment.partner_bank_id.l10n_ch_qr_iban and\
|
||||
not payment._l10n_ch_reference_is_valid(payment.memo):
|
||||
payment.l10n_ch_reference_warning_msg = _("Please fill in a correct QRR reference in the payment reference. The banks will refuse your payment file otherwise.")
|
||||
else:
|
||||
payment.l10n_ch_reference_warning_msg = False
|
||||
|
||||
def _l10n_ch_reference_is_valid(self, payment_reference):
|
||||
"""Check if this invoice has a valid reference (for Switzerland)
|
||||
e.g.
|
||||
000000000000000000000012371
|
||||
210000000003139471430009017
|
||||
21 00000 00003 13947 14300 09017
|
||||
"""
|
||||
self.ensure_one()
|
||||
if not payment_reference:
|
||||
return False
|
||||
ref = payment_reference.replace(' ', '')
|
||||
if re.match(r'^(\d{2,27})$', ref):
|
||||
return ref == mod10r(ref[:-1])
|
||||
return False
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountChartTemplate(models.Model):
|
||||
_inherit = 'account.chart.template'
|
||||
|
||||
# Write paperformat and report template used on company
|
||||
def _load(self, company):
|
||||
res = super(AccountChartTemplate, self)._load(company)
|
||||
if self == self.env.ref('l10n_ch.l10nch_chart_template'):
|
||||
company.write({
|
||||
'external_report_layout_id': self.env.ref('l10n_din5008.external_layout_din5008').id,
|
||||
'paperformat_id': self.env.ref('l10n_din5008.paperformat_euro_din').id
|
||||
})
|
||||
return res
|
||||
|
|
@ -10,6 +10,7 @@ from reportlab.lib.units import mm
|
|||
CH_QR_CROSS_SIZE_RATIO = 0.1522 # Ratio between the side length of the Swiss QR-code cross image and the QR-code's
|
||||
CH_QR_CROSS_FILE = Path('../static/src/img/CH-Cross_7mm.png') # Image file containing the Swiss QR-code cross to add on top of the QR-code
|
||||
|
||||
|
||||
class IrActionsReport(models.Model):
|
||||
_inherit = 'ir.actions.report'
|
||||
|
||||
|
|
@ -38,73 +39,39 @@ class IrActionsReport(models.Model):
|
|||
report = self._get_report(report_ref)
|
||||
if self._is_invoice_report(report_ref):
|
||||
invoices = self.env[report.model].browse(res_ids)
|
||||
# Determine which invoices need a QR/ISR.
|
||||
qr_inv_ids = []
|
||||
isr_inv_ids = []
|
||||
for invoice in invoices:
|
||||
# avoid duplicating existing streams
|
||||
if report.attachment_use and report.retrieve_attachment(invoice):
|
||||
continue
|
||||
if invoice.l10n_ch_is_qr_valid:
|
||||
qr_inv_ids.append(invoice.id)
|
||||
elif invoice.company_id.country_code == 'CH' and invoice.l10n_ch_isr_valid:
|
||||
isr_inv_ids.append(invoice.id)
|
||||
# Render the additional reports.
|
||||
streams_to_append = {}
|
||||
|
||||
# Determine which invoices need a QR.
|
||||
qr_inv_ids = invoices.filtered('l10n_ch_is_qr_valid').ids
|
||||
|
||||
if qr_inv_ids:
|
||||
qr_res = self._render_qweb_pdf_prepare_streams(
|
||||
'l10n_ch.l10n_ch_qr_report',
|
||||
{
|
||||
**data,
|
||||
'skip_headers': False,
|
||||
},
|
||||
data,
|
||||
res_ids=qr_inv_ids,
|
||||
)
|
||||
header = self.env.ref('l10n_ch.l10n_ch_qr_header', raise_if_not_found=False)
|
||||
if header:
|
||||
# Make a separated rendering to get the a page containing the company header. Then, merge the qr bill with it.
|
||||
|
||||
header_res = self._render_qweb_pdf_prepare_streams(
|
||||
'l10n_ch.l10n_ch_qr_header',
|
||||
{
|
||||
**data,
|
||||
'skip_headers': True,
|
||||
},
|
||||
res_ids=qr_inv_ids,
|
||||
)
|
||||
for invoice_id, stream in qr_res.items():
|
||||
qr_pdf = OdooPdfFileReader(stream['stream'], strict=False)
|
||||
res_pdf = OdooPdfFileReader(res[invoice_id]['stream'], strict=False)
|
||||
|
||||
for invoice_id, stream in qr_res.items():
|
||||
qr_pdf = OdooPdfFileReader(stream['stream'], strict=False)
|
||||
header_pdf = OdooPdfFileReader(header_res[invoice_id]['stream'], strict=False)
|
||||
last_page = res_pdf.getPage(-1)
|
||||
last_page.mergePage(qr_pdf.getPage(0))
|
||||
|
||||
page = header_pdf.getPage(0)
|
||||
page.mergePage(qr_pdf.getPage(0))
|
||||
output_pdf = OdooPdfFileWriter()
|
||||
|
||||
output_pdf = OdooPdfFileWriter()
|
||||
output_pdf.addPage(page)
|
||||
new_pdf_stream = io.BytesIO()
|
||||
output_pdf.write(new_pdf_stream)
|
||||
streams_to_append[invoice_id] = {'stream': new_pdf_stream}
|
||||
else:
|
||||
for invoice_id, stream in qr_res.items():
|
||||
streams_to_append[invoice_id] = stream
|
||||
# Add all pages from the original PDF except the last one
|
||||
for page_num in range(res_pdf.getNumPages() - 1):
|
||||
output_pdf.addPage(res_pdf.getPage(page_num))
|
||||
|
||||
if isr_inv_ids:
|
||||
isr_res = self._render_qweb_pdf_prepare_streams('l10n_ch.l10n_ch_isr_report', data, res_ids=isr_inv_ids)
|
||||
for invoice_id, stream in isr_res.items():
|
||||
streams_to_append[invoice_id] = stream
|
||||
output_pdf.addPage(last_page) # Add the modified last page (with the QR code merged)
|
||||
|
||||
new_pdf_stream = io.BytesIO()
|
||||
output_pdf.write(new_pdf_stream)
|
||||
new_pdf_stream.seek(0)
|
||||
res[invoice_id]['stream'].close()
|
||||
res[invoice_id]['stream'] = new_pdf_stream
|
||||
stream['stream'].close()
|
||||
|
||||
# Add to results
|
||||
for invoice_id, additional_stream in streams_to_append.items():
|
||||
invoice_stream = res[invoice_id]['stream']
|
||||
writer = OdooPdfFileWriter()
|
||||
writer.appendPagesFromReader(OdooPdfFileReader(invoice_stream, strict=False))
|
||||
writer.appendPagesFromReader(OdooPdfFileReader(additional_stream['stream'], strict=False))
|
||||
new_pdf_stream = io.BytesIO()
|
||||
writer.write(new_pdf_stream)
|
||||
res[invoice_id]['stream'] = new_pdf_stream
|
||||
invoice_stream.close()
|
||||
additional_stream['stream'].close()
|
||||
return res
|
||||
|
||||
def get_paperformat(self):
|
||||
|
|
|
|||
|
|
@ -6,37 +6,14 @@ from stdnum.util import clean
|
|||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.addons.base.models.res_bank import sanitize_account_number
|
||||
from odoo.addons.base_iban.models.res_partner_bank import normalize_iban, pretty_iban, validate_iban
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
from odoo.addons.base_iban.models.res_partner_bank import normalize_iban, pretty_iban, validate_iban, get_iban_part
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tools import LazyTranslate, street_split
|
||||
from odoo.tools.misc import mod10r
|
||||
|
||||
ISR_SUBSCRIPTION_CODE = {'CHF': '01', 'EUR': '03'}
|
||||
CLEARING = "09000"
|
||||
_re_postal = re.compile('^[0-9]{2}-[0-9]{1,6}-[0-9]$')
|
||||
_lt = LazyTranslate(__name__)
|
||||
|
||||
|
||||
def _is_l10n_ch_postal(account_ref):
|
||||
""" Returns True if the string account_ref is a valid postal account number,
|
||||
i.e. it only contains ciphers and is last cipher is the result of a recursive
|
||||
modulo 10 operation ran over the rest of it. Shorten form with - is also accepted.
|
||||
"""
|
||||
if _re_postal.match(account_ref or ''):
|
||||
ref_subparts = account_ref.split('-')
|
||||
account_ref = ref_subparts[0] + ref_subparts[1].rjust(6, '0') + ref_subparts[2]
|
||||
|
||||
if re.match(r'\d+$', account_ref or ''):
|
||||
account_ref_without_check = account_ref[:-1]
|
||||
return mod10r(account_ref_without_check) == account_ref
|
||||
return False
|
||||
|
||||
def _is_l10n_ch_isr_issuer(account_ref, currency_code):
|
||||
""" Returns True if the string account_ref is a valid a valid ISR issuer
|
||||
An ISR issuer is postal account number that starts by 01 (CHF) or 03 (EUR),
|
||||
"""
|
||||
if (account_ref or '').startswith(ISR_SUBSCRIPTION_CODE[currency_code]):
|
||||
return _is_l10n_ch_postal(account_ref)
|
||||
return False
|
||||
|
||||
def validate_qr_iban(qr_iban):
|
||||
# Check first if it's a valid IBAN.
|
||||
validate_iban(qr_iban)
|
||||
|
|
@ -45,34 +22,24 @@ def validate_qr_iban(qr_iban):
|
|||
sanitized_qr_iban = sanitize_account_number(qr_iban)
|
||||
|
||||
if sanitized_qr_iban[:2] not in ['CH', 'LI']:
|
||||
raise ValidationError(_("QR-IBAN numbers are only available in Switzerland."))
|
||||
raise ValidationError(_lt("QR-IBAN numbers are only available in Switzerland."))
|
||||
|
||||
# Now, check if it's valid QR-IBAN (based on its IID).
|
||||
if not check_qr_iban_range(sanitized_qr_iban):
|
||||
raise ValidationError(_("QR-IBAN '%s' is invalid.") % qr_iban)
|
||||
raise ValidationError(_lt("QR-IBAN “%s” is invalid.", qr_iban))
|
||||
|
||||
return True
|
||||
|
||||
def check_qr_iban_range(iban):
|
||||
if not iban or len(iban) < 9:
|
||||
return False
|
||||
iid_start_index = 4
|
||||
iid_end_index = 8
|
||||
iid = iban[iid_start_index : iid_end_index+1]
|
||||
iid = get_iban_part(iban, 'bank')
|
||||
return re.match(r'\d+', iid) and 30000 <= int(iid) <= 31999 # Those values for iid are reserved for QR-IBANs only
|
||||
|
||||
|
||||
class ResPartnerBank(models.Model):
|
||||
_inherit = 'res.partner.bank'
|
||||
|
||||
l10n_ch_postal = fields.Char(
|
||||
string="Swiss Postal Account",
|
||||
readonly=False, store=True,
|
||||
compute='_compute_l10n_ch_postal',
|
||||
help="This field is used for the Swiss postal account number on a vendor account and for the client number on "
|
||||
"your own account. The client number is mostly 6 numbers without -, while the postal account number can "
|
||||
"be e.g. 01-162-8")
|
||||
|
||||
l10n_ch_qr_iban = fields.Char(string='QR-IBAN',
|
||||
compute='_compute_l10n_ch_qr_iban',
|
||||
store=True,
|
||||
|
|
@ -81,60 +48,18 @@ class ResPartnerBank(models.Model):
|
|||
"still use the main IBAN in the Account Number while you will see the "
|
||||
"QR-IBAN for the barcode. ")
|
||||
|
||||
# fields to configure ISR payment slip generation
|
||||
l10n_ch_isr_subscription_chf = fields.Char(string='CHF ISR Subscription Number', help='The subscription number provided by the bank or Postfinance to identify the bank, used to generate ISR in CHF. eg. 01-162-8')
|
||||
l10n_ch_isr_subscription_eur = fields.Char(string='EUR ISR Subscription Number', help='The subscription number provided by the bank or Postfinance to identify the bank, used to generate ISR in EUR. eg. 03-162-5')
|
||||
l10n_ch_show_subscription = fields.Boolean(compute='_compute_l10n_ch_show_subscription', default=lambda self: self.env.company.account_fiscal_country_id.code == 'CH')
|
||||
|
||||
def _is_isr_issuer(self):
|
||||
return (_is_l10n_ch_isr_issuer(self.l10n_ch_postal, 'CHF')
|
||||
or _is_l10n_ch_isr_issuer(self.l10n_ch_postal, 'EUR'))
|
||||
|
||||
@api.constrains("l10n_ch_postal", "partner_id")
|
||||
def _check_postal_num(self):
|
||||
"""Validate postal number format"""
|
||||
for rec in self:
|
||||
if rec.l10n_ch_postal and not _is_l10n_ch_postal(rec.l10n_ch_postal):
|
||||
# l10n_ch_postal is used for the purpose of Client Number on your own accounts, so don't do the check there
|
||||
if rec.partner_id and not rec.partner_id.ref_company_ids:
|
||||
raise ValidationError(
|
||||
_("The postal number {} is not valid.\n"
|
||||
"It must be a valid postal number format. eg. 10-8060-7").format(rec.l10n_ch_postal))
|
||||
return True
|
||||
|
||||
@api.constrains("l10n_ch_isr_subscription_chf", "l10n_ch_isr_subscription_eur")
|
||||
def _check_subscription_num(self):
|
||||
"""Validate ISR subscription number format
|
||||
Subscription number can only starts with 01 or 03
|
||||
"""
|
||||
for rec in self:
|
||||
for currency in ["CHF", "EUR"]:
|
||||
subscrip = rec.l10n_ch_isr_subscription_chf if currency == "CHF" else rec.l10n_ch_isr_subscription_eur
|
||||
if subscrip and not _is_l10n_ch_isr_issuer(subscrip, currency):
|
||||
example = "01-162-8" if currency == "CHF" else "03-162-5"
|
||||
raise ValidationError(
|
||||
_("The ISR subcription {} for {} number is not valid.\n"
|
||||
"It must starts with {} and we a valid postal number format. eg. {}"
|
||||
).format(subscrip, currency, ISR_SUBSCRIPTION_CODE[currency], example))
|
||||
return True
|
||||
# fields to configure payment slip generation
|
||||
l10n_ch_display_qr_bank_options = fields.Boolean(compute='_compute_l10n_ch_display_qr_bank_options')
|
||||
|
||||
@api.depends('partner_id', 'company_id')
|
||||
def _compute_l10n_ch_show_subscription(self):
|
||||
def _compute_l10n_ch_display_qr_bank_options(self):
|
||||
for bank in self:
|
||||
if bank.partner_id:
|
||||
bank.l10n_ch_show_subscription = bank.partner_id.ref_company_ids.country_id.code in ('CH', 'LI')
|
||||
bank.l10n_ch_display_qr_bank_options = bank.partner_id.ref_company_ids.country_id.code in ('CH', 'LI')
|
||||
elif bank.company_id:
|
||||
bank.l10n_ch_show_subscription = bank.company_id.account_fiscal_country_id.code in ('CH', 'LI')
|
||||
bank.l10n_ch_display_qr_bank_options = bank.company_id.account_fiscal_country_id.code in ('CH', 'LI')
|
||||
else:
|
||||
bank.l10n_ch_show_subscription = self.env.company.account_fiscal_country_id.code in ('CH', 'LI')
|
||||
|
||||
@api.depends('acc_number', 'acc_type')
|
||||
def _compute_sanitized_acc_number(self):
|
||||
#Only remove spaces in case it is not postal
|
||||
postal_banks = self.filtered(lambda b: b.acc_type == "postal")
|
||||
for bank in postal_banks:
|
||||
bank.sanitized_acc_number = bank.acc_number
|
||||
super(ResPartnerBank, self - postal_banks)._compute_sanitized_acc_number()
|
||||
bank.l10n_ch_display_qr_bank_options = self.env.company.account_fiscal_country_id.code in ('CH', 'LI')
|
||||
|
||||
@api.depends('acc_number')
|
||||
def _compute_l10n_ch_qr_iban(self):
|
||||
|
|
@ -144,7 +69,6 @@ class ResPartnerBank(models.Model):
|
|||
valid_qr_iban = True
|
||||
except ValidationError:
|
||||
valid_qr_iban = False
|
||||
|
||||
if valid_qr_iban:
|
||||
record.l10n_ch_qr_iban = record.sanitized_acc_number
|
||||
else:
|
||||
|
|
@ -164,89 +88,16 @@ class ResPartnerBank(models.Model):
|
|||
vals['l10n_ch_qr_iban'] = pretty_iban(normalize_iban(vals['l10n_ch_qr_iban']))
|
||||
return super().write(vals)
|
||||
|
||||
@api.model
|
||||
def _get_supported_account_types(self):
|
||||
rslt = super(ResPartnerBank, self)._get_supported_account_types()
|
||||
rslt.append(('postal', _('Postal')))
|
||||
return rslt
|
||||
|
||||
@api.model
|
||||
def retrieve_acc_type(self, acc_number):
|
||||
""" Overridden method enabling the recognition of swiss postal bank
|
||||
account numbers.
|
||||
"""
|
||||
acc_number_split = ""
|
||||
# acc_number_split is needed to continue to recognize the account
|
||||
# as a postal account even if the difference
|
||||
if acc_number and " " in acc_number:
|
||||
acc_number_split = acc_number.split(" ")[0]
|
||||
if _is_l10n_ch_postal(acc_number) or (acc_number_split and _is_l10n_ch_postal(acc_number_split)):
|
||||
return 'postal'
|
||||
else:
|
||||
return super(ResPartnerBank, self).retrieve_acc_type(acc_number)
|
||||
|
||||
@api.depends('acc_number', 'partner_id', 'acc_type')
|
||||
def _compute_l10n_ch_postal(self):
|
||||
for record in self:
|
||||
if record.acc_type == 'iban':
|
||||
record.l10n_ch_postal = self._retrieve_l10n_ch_postal(record.sanitized_acc_number)
|
||||
elif record.acc_type == 'postal':
|
||||
if record.acc_number and " " in record.acc_number:
|
||||
record.l10n_ch_postal = record.acc_number.split(" ")[0]
|
||||
else:
|
||||
record.l10n_ch_postal = record.acc_number
|
||||
# In case of ISR issuer, this number is not
|
||||
# unique and we fill acc_number with partner
|
||||
# name to give proper information to the user
|
||||
if record.partner_id and record.acc_number[:2] in ["01", "03"]:
|
||||
record.acc_number = ("{} {}").format(record.acc_number, record.partner_id.name)
|
||||
|
||||
@api.model
|
||||
def _is_postfinance_iban(self, iban):
|
||||
"""Postfinance IBAN have format
|
||||
CHXX 0900 0XXX XXXX XXXX K
|
||||
Where 09000 is the clearing number
|
||||
"""
|
||||
return iban.startswith(('CH', 'LI')) and iban[4:9] == CLEARING
|
||||
|
||||
@api.model
|
||||
def _pretty_postal_num(self, number):
|
||||
"""format a postal account number or an ISR subscription number
|
||||
as per specifications with '-' separators.
|
||||
eg. 010001628 -> 01-162-8
|
||||
"""
|
||||
if re.match('^[0-9]{2}-[0-9]{1,6}-[0-9]$', number or ''):
|
||||
return number
|
||||
currency_code = number[:2]
|
||||
middle_part = number[2:-1]
|
||||
trailing_cipher = number[-1]
|
||||
middle_part = middle_part.lstrip("0")
|
||||
return currency_code + '-' + middle_part + '-' + trailing_cipher
|
||||
|
||||
@api.model
|
||||
def _retrieve_l10n_ch_postal(self, iban):
|
||||
"""Reads a swiss postal account number from a an IBAN and returns it as
|
||||
a string. Returns None if no valid postal account number was found, or
|
||||
the given iban was not from Swiss Postfinance.
|
||||
|
||||
CH09 0900 0000 1000 8060 7 -> 10-8060-7
|
||||
"""
|
||||
if self._is_postfinance_iban(iban):
|
||||
# the IBAN corresponds to a swiss account
|
||||
return self._pretty_postal_num(iban[-9:])
|
||||
return None
|
||||
|
||||
def _l10n_ch_get_qr_vals(self, amount, currency, debtor_partner, free_communication, structured_communication):
|
||||
comment = ""
|
||||
if free_communication:
|
||||
comment = (free_communication[:137] + '...') if len(free_communication) > 140 else free_communication
|
||||
|
||||
creditor_addr_1, creditor_addr_2 = self._get_partner_address_lines(self.partner_id)
|
||||
debtor_addr_1, debtor_addr_2 = self._get_partner_address_lines(debtor_partner)
|
||||
cred_street, cred_street_number, cred_zip, cred_city = self._get_partner_address_lines(self.partner_id)
|
||||
debt_street, debt_street_number, debt_zip, debt_city = self._get_partner_address_lines(debtor_partner)
|
||||
|
||||
# Compute reference type (empty by default, only mandatory for QR-IBAN,
|
||||
# and must then be 27 characters-long, with mod10r check digit as the 27th one,
|
||||
# just like ISR number for invoices)
|
||||
# and must then be 27 characters-long, with mod10r check digit as the 27th one)
|
||||
reference_type = 'NON'
|
||||
reference = ''
|
||||
acc_number = self.sanitized_acc_number
|
||||
|
|
@ -262,17 +113,17 @@ class ResPartnerBank(models.Model):
|
|||
|
||||
currency = currency or self.currency_id or self.company_id.currency_id
|
||||
|
||||
return [
|
||||
result = [
|
||||
'SPC', # QR Type
|
||||
'0200', # Version
|
||||
'1', # Coding Type
|
||||
acc_number, # IBAN / QR-IBAN
|
||||
'K', # Creditor Address Type
|
||||
'S', # Creditor Address Type
|
||||
(self.acc_holder_name or self.partner_id.name)[:70], # Creditor Name
|
||||
creditor_addr_1, # Creditor Address Line 1
|
||||
creditor_addr_2, # Creditor Address Line 2
|
||||
'', # Creditor Postal Code (empty, since we're using combined addres elements)
|
||||
'', # Creditor Town (empty, since we're using combined addres elements)
|
||||
cred_street, # Creditor Street Name
|
||||
cred_street_number, # Creditor Building Number
|
||||
cred_zip, # Creditor Postal Code
|
||||
cred_city, # Creditor Town
|
||||
self.partner_id.country_id.code, # Creditor Country
|
||||
'', # Ultimate Creditor Address Type
|
||||
'', # Name
|
||||
|
|
@ -283,19 +134,22 @@ class ResPartnerBank(models.Model):
|
|||
'', # Ultimate Creditor Country
|
||||
'{:.2f}'.format(amount), # Amount
|
||||
currency.name, # Currency
|
||||
'K', # Ultimate Debtor Address Type
|
||||
'S', # Ultimate Debtor Address Type
|
||||
debtor_partner.commercial_partner_id.name[:70], # Ultimate Debtor Name
|
||||
debtor_addr_1, # Ultimate Debtor Address Line 1
|
||||
debtor_addr_2, # Ultimate Debtor Address Line 2
|
||||
'', # Ultimate Debtor Postal Code (not to be provided for address type K)
|
||||
'', # Ultimate Debtor Postal City (not to be provided for address type K)
|
||||
debtor_partner.country_id.code, # Ultimate Debtor Postal Country
|
||||
debt_street, # Ultimate Debtor Street Name
|
||||
debt_street_number, # Ultimate Debtor Building Number
|
||||
debt_zip, # Ultimate Debtor Postal Code
|
||||
debt_city, # Ultimate Debtor Town
|
||||
debtor_partner.country_id.code, # Ultimate Debtor Country
|
||||
reference_type, # Reference Type
|
||||
reference, # Reference
|
||||
comment, # Unstructured Message
|
||||
'EPD', # Mandatory trailer part
|
||||
]
|
||||
|
||||
# newlines shift field content to a different line, causing the QR code to be rejected
|
||||
return [line.replace('\n', ' ') for line in result]
|
||||
|
||||
def _get_qr_vals(self, qr_method, amount, currency, debtor_partner, free_communication, structured_communication):
|
||||
if qr_method == 'ch_qr':
|
||||
return self._l10n_ch_get_qr_vals(amount, currency, debtor_partner, free_communication, structured_communication)
|
||||
|
|
@ -307,7 +161,7 @@ class ResPartnerBank(models.Model):
|
|||
'barcode_type': 'QR',
|
||||
'width': 256,
|
||||
'height': 256,
|
||||
'quiet': 1,
|
||||
'quiet': 0,
|
||||
'mask': 'ch_cross',
|
||||
'value': '\n'.join(self._get_qr_vals(qr_method, amount, currency, debtor_partner, free_communication, structured_communication)),
|
||||
# Swiss QR code requires Error Correction Level = 'M' by specification
|
||||
|
|
@ -316,14 +170,28 @@ class ResPartnerBank(models.Model):
|
|||
return super()._get_qr_code_generation_params(qr_method, amount, currency, debtor_partner, free_communication, structured_communication)
|
||||
|
||||
def _get_partner_address_lines(self, partner):
|
||||
""" Returns a tuple of two elements containing the address lines to use
|
||||
for this partner. Line 1 contains the street and number, line 2 contains
|
||||
zip and city. Those two lines are limited to 70 characters
|
||||
""" Retrieves the partner's address fields, truncated to respect the line specs.
|
||||
:returns: tuple(street, street_number, zip, city)
|
||||
"""
|
||||
streets = [partner.street, partner.street2]
|
||||
line_1 = ' '.join(filter(None, streets))
|
||||
line_2 = partner.zip + ' ' + partner.city
|
||||
return line_1[:70], line_2[:70]
|
||||
street_1_split = street_split(partner.street or '')
|
||||
street_name = street_1_split['street_name']
|
||||
building_number = f"{street_1_split['street_number']} {street_1_split['street_number2']}".strip()
|
||||
|
||||
if building_number:
|
||||
concatenated_building_number = f"{building_number} {partner.street2 or ''}".strip()
|
||||
if len(concatenated_building_number) <= 16:
|
||||
building_number = concatenated_building_number
|
||||
else:
|
||||
# Try to complete the address with street2
|
||||
street_2_split = street_split(partner.street2 or '')
|
||||
|
||||
building_number = f"{street_2_split['street_number']} {street_2_split['street_number2']}".strip()
|
||||
if building_number:
|
||||
street_name = f"{street_name} {street_2_split['street_name']}".strip()
|
||||
else:
|
||||
building_number = (partner.street2 or '').strip()
|
||||
|
||||
return street_name[:70], building_number[:16], partner.zip[:16], partner.city[:35]
|
||||
|
||||
@api.model
|
||||
def _is_qr_reference(self, reference):
|
||||
|
|
@ -331,9 +199,9 @@ class ResPartnerBank(models.Model):
|
|||
made of 27 digits, the 27th being a mod10r check on the 26 previous ones.
|
||||
"""
|
||||
return reference \
|
||||
and len(reference) == 27 \
|
||||
and re.match(r'\d+$', reference) \
|
||||
and reference == mod10r(reference[:-1])
|
||||
and len(reference) == 27 \
|
||||
and re.match(r'\d+$', reference) \
|
||||
and reference == mod10r(reference[:-1])
|
||||
|
||||
@api.model
|
||||
def _is_iso11649_reference(self, reference):
|
||||
|
|
@ -346,21 +214,30 @@ class ResPartnerBank(models.Model):
|
|||
and int(''.join(str(int(x, 36)) for x in clean(reference[4:] + reference[:4], ' -.,/:').upper().strip())) % 97 == 1
|
||||
# see https://github.com/arthurdejong/python-stdnum/blob/master/stdnum/iso11649.py
|
||||
|
||||
def _eligible_for_qr_code(self, qr_method, debtor_partner, currency, raises_error=True):
|
||||
if qr_method == 'ch_qr':
|
||||
error_messages = [_("The QR code could not be generated for the following reason(s):")]
|
||||
def _l10n_ch_qr_debtor_check(self, debtor_partner):
|
||||
""" This method should be used in _get_error_messages_for_qr and _check_for_qr_code_errors
|
||||
It allows is to permit to set this qr method if a partner is not yet provided when executing _get_error_messages_for_qr
|
||||
while preventing to print qr code when executing _check_for_qr_code_errors if the partner is not provided
|
||||
"""
|
||||
if not debtor_partner or debtor_partner.country_id.code not in ('CH', 'LI'):
|
||||
return _("The debtor partner's address isn't located in Switzerland.")
|
||||
return False
|
||||
|
||||
def _get_error_messages_for_qr(self, qr_method, debtor_partner, currency):
|
||||
def _get_error_for_ch_qr():
|
||||
error_messages = [_("The Swiss QR code could not be generated for the following reason(s):")]
|
||||
if self.acc_type != 'iban':
|
||||
error_messages.append(_("The account type isn't QR-IBAN or IBAN."))
|
||||
if not debtor_partner or debtor_partner.country_id.code not in ('CH', 'LI'):
|
||||
error_messages.append(_("The debtor partner's address isn't located in Switzerland."))
|
||||
debtor_check = self._l10n_ch_qr_debtor_check(debtor_partner)
|
||||
if debtor_partner and debtor_check:
|
||||
error_messages.append(debtor_check)
|
||||
if currency.id not in (self.env.ref('base.EUR').id, self.env.ref('base.CHF').id):
|
||||
error_messages.append(_("The currency isn't EUR nor CHF. \r\n"))
|
||||
if len(error_messages) != 1:
|
||||
if raises_error:
|
||||
raise UserError(' '.join(error_messages))
|
||||
return False
|
||||
return True
|
||||
return super()._eligible_for_qr_code(qr_method, debtor_partner, currency, raises_error)
|
||||
error_messages.append(_("The currency isn't EUR nor CHF."))
|
||||
return '\r\n'.join(error_messages) if len(error_messages) > 1 else None
|
||||
|
||||
if qr_method == 'ch_qr':
|
||||
return _get_error_for_ch_qr()
|
||||
return super()._get_error_messages_for_qr(qr_method, debtor_partner, currency)
|
||||
|
||||
def _check_for_qr_code_errors(self, qr_method, amount, currency, debtor_partner, free_communication, structured_communication):
|
||||
def _partner_fields_set(partner):
|
||||
|
|
@ -379,6 +256,10 @@ class ResPartnerBank(models.Model):
|
|||
if self.l10n_ch_qr_iban and not self._is_qr_reference(structured_communication):
|
||||
return _("When using a QR-IBAN as the destination account of a QR-code, the payment reference must be a QR-reference.")
|
||||
|
||||
debtor_check = self._l10n_ch_qr_debtor_check(debtor_partner)
|
||||
if debtor_check:
|
||||
return debtor_check
|
||||
|
||||
return super()._check_for_qr_code_errors(qr_method, amount, currency, debtor_partner, free_communication, structured_communication)
|
||||
|
||||
@api.model
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
class Company(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
l10n_ch_isr_preprinted_account = fields.Boolean(string='Preprinted account', compute='_compute_l10n_ch_isr', inverse='_set_l10n_ch_isr')
|
||||
l10n_ch_isr_preprinted_bank = fields.Boolean(string='Preprinted bank', compute='_compute_l10n_ch_isr', inverse='_set_l10n_ch_isr')
|
||||
l10n_ch_isr_print_bank_location = fields.Boolean(string='Print bank location', default=False, help='Boolean option field indicating whether or not the alternate layout (the one printing bank name and address) must be used when generating an ISR.')
|
||||
l10n_ch_isr_scan_line_left = fields.Float(string='Scan line horizontal offset (mm)', compute='_compute_l10n_ch_isr', inverse='_set_l10n_ch_isr')
|
||||
l10n_ch_isr_scan_line_top = fields.Float(string='Scan line vertical offset (mm)', compute='_compute_l10n_ch_isr', inverse='_set_l10n_ch_isr')
|
||||
|
||||
def _compute_l10n_ch_isr(self):
|
||||
get_param = self.env['ir.config_parameter'].sudo().get_param
|
||||
for company in self:
|
||||
company.l10n_ch_isr_preprinted_account = bool(get_param('l10n_ch.isr_preprinted_account', default=False))
|
||||
company.l10n_ch_isr_preprinted_bank = bool(get_param('l10n_ch.isr_preprinted_bank', default=False))
|
||||
company.l10n_ch_isr_scan_line_top = float(get_param('l10n_ch.isr_scan_line_top', default=0))
|
||||
company.l10n_ch_isr_scan_line_left = float(get_param('l10n_ch.isr_scan_line_left', default=0))
|
||||
|
||||
def _set_l10n_ch_isr(self):
|
||||
set_param = self.env['ir.config_parameter'].sudo().set_param
|
||||
for company in self:
|
||||
set_param("l10n_ch.isr_preprinted_account", company.l10n_ch_isr_preprinted_account)
|
||||
set_param("l10n_ch.isr_preprinted_bank", company.l10n_ch_isr_preprinted_bank)
|
||||
set_param("l10n_ch.isr_scan_line_top", company.l10n_ch_isr_scan_line_top)
|
||||
set_param("l10n_ch.isr_scan_line_left", company.l10n_ch_isr_scan_line_left)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
l10n_ch_isr_preprinted_account = fields.Boolean(string='Preprinted account',
|
||||
related="company_id.l10n_ch_isr_preprinted_account", readonly=False)
|
||||
l10n_ch_isr_preprinted_bank = fields.Boolean(string='Preprinted bank',
|
||||
related="company_id.l10n_ch_isr_preprinted_bank", readonly=False)
|
||||
l10n_ch_isr_print_bank_location = fields.Boolean(string="Print bank on ISR",
|
||||
related="company_id.l10n_ch_isr_print_bank_location", readonly=False,
|
||||
required=True)
|
||||
l10n_ch_isr_scan_line_left = fields.Float(string='Horizontal offset',
|
||||
related="company_id.l10n_ch_isr_scan_line_left", readonly=False)
|
||||
l10n_ch_isr_scan_line_top = fields.Float(string='Vertical offset',
|
||||
related="company_id.l10n_ch_isr_scan_line_top", readonly=False)
|
||||
50
odoo-bringout-oca-ocb-l10n_ch/l10n_ch/models/template_ch.py
Normal file
50
odoo-bringout-oca-ocb-l10n_ch/l10n_ch/models/template_ch.py
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import models
|
||||
from odoo.addons.account.models.chart_template import template
|
||||
|
||||
|
||||
class AccountChartTemplate(models.AbstractModel):
|
||||
_inherit = 'account.chart.template'
|
||||
|
||||
@template('ch')
|
||||
def _get_ch_template_data(self):
|
||||
return {
|
||||
'code_digits': '4',
|
||||
'property_account_receivable_id': 'ch_coa_1100',
|
||||
'property_account_payable_id': 'ch_coa_2000',
|
||||
}
|
||||
|
||||
@template('ch', 'res.company')
|
||||
def _get_ch_res_company(self):
|
||||
return {
|
||||
self.env.company.id: {
|
||||
'account_fiscal_country_id': 'base.ch',
|
||||
'bank_account_code_prefix': '102',
|
||||
'cash_account_code_prefix': '100',
|
||||
'transfer_account_code_prefix': '1090',
|
||||
'account_default_pos_receivable_account_id': 'ch_coa_1101',
|
||||
'income_currency_exchange_account_id': 'ch_coa_3806',
|
||||
'expense_currency_exchange_account_id': 'ch_coa_4906',
|
||||
'account_journal_early_pay_discount_loss_account_id': 'ch_coa_4901',
|
||||
'account_journal_early_pay_discount_gain_account_id': 'ch_coa_3801',
|
||||
'default_cash_difference_expense_account_id': 'ch_coa_4991',
|
||||
'default_cash_difference_income_account_id': 'ch_coa_4992',
|
||||
'account_sale_tax_id': 'vat_sale_81',
|
||||
'account_purchase_tax_id': 'vat_purchase_81',
|
||||
'external_report_layout_id': 'l10n_din5008.external_layout_din5008',
|
||||
'paperformat_id': 'l10n_din5008.paperformat_euro_din',
|
||||
'expense_account_id': 'ch_coa_4200',
|
||||
'income_account_id': 'ch_coa_3200',
|
||||
'account_stock_journal_id': 'inventory_valuation',
|
||||
'account_stock_valuation_id': 'ch_coa_1210',
|
||||
},
|
||||
}
|
||||
|
||||
@template('ch', 'account.account')
|
||||
def _get_ch_account_account(self):
|
||||
return {
|
||||
'ch_coa_1210': {
|
||||
'account_stock_expense_id': 'ch_coa_4000',
|
||||
'account_stock_variation_id': 'ch_coa_4801',
|
||||
},
|
||||
}
|
||||
|
|
@ -1,157 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="paperformat_euro_no_margin" model="report.paperformat">
|
||||
<field name="name">European A4 without borders</field>
|
||||
<field name="default" eval="False" />
|
||||
<field name="format">A4</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">0</field>
|
||||
<field name="margin_bottom">0</field>
|
||||
<field name="margin_left">0</field>
|
||||
<field name="margin_right">0</field>
|
||||
<field name="header_line" eval="False" />
|
||||
<field name="header_spacing">0</field>
|
||||
</record>
|
||||
|
||||
<!--Report containing an ISR corrresponding to an invoice.-->
|
||||
<record id="l10n_ch_isr_report" model="ir.actions.report">
|
||||
<field name="name">ISR</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">l10n_ch.isr_report_main</field>
|
||||
<field name="report_file">l10n_ch.isr_report_main</field>
|
||||
<field name="print_report_name">'ISR-%s' % object.name</field>
|
||||
<field name="paperformat_id" ref="paperformat_euro_no_margin"/>
|
||||
<field name="attachment">'ISR-' + object.name + '.pdf'</field>
|
||||
<field name="attachment_use">True</field>
|
||||
</record>
|
||||
<!--No additional condition in report name on invoice state or type as this
|
||||
report is only available to be printed for out invoices after
|
||||
'draft' state, if the fields required by the ISR have been set.-->
|
||||
|
||||
<template id="l10n_ch_isr_report_template">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="split_total_amount" t-value="invoice.split_total_amount()"/>
|
||||
<t t-set="print_bank" t-value="invoice.company_id.l10n_ch_isr_print_bank_location"/>
|
||||
|
||||
<!-- add class to body tag -->
|
||||
<script>document.body.className += " l10n_ch_isr";</script>
|
||||
|
||||
<!-- since the body content take the whole page we need a way to add margin
|
||||
back on content outside the ISR so it does not overlap with the header -->
|
||||
<div id="content_outside_isr">
|
||||
<h1>ISR for invoice <t t-esc="invoice.name"/></h1>
|
||||
</div>
|
||||
|
||||
<div id="isr" t-att-class="'isr-print-bank' if print_bank else None">
|
||||
|
||||
<!--Voucher, left part of the ISR.-->
|
||||
<div id="voucher">
|
||||
<!--Einzahlung für/Versement pour/Versamento per-->
|
||||
|
||||
<!--If we use the alternate ISR layout, displaying name
|
||||
and location of the bank.-->
|
||||
<t t-if="print_bank">
|
||||
<div id="voucher-for-bank">
|
||||
<p t-if="not invoice.company_id.l10n_ch_isr_preprinted_bank">
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.name"/><br />
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.zip"/>
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.city"/>
|
||||
</p>
|
||||
</div>
|
||||
<!--Zugunsten von/En faveur de/A favore di-->
|
||||
</t>
|
||||
<div id="voucher-for-contact">
|
||||
<p id="voucher-for_name" t-field="invoice.company_id.display_name"/>
|
||||
<p id="voucher-for_address1" t-field="invoice.company_id.street"/>
|
||||
<p id="voucher-for_address2" t-field="invoice.company_id.street2"/>
|
||||
<p id="voucher-for_address3">
|
||||
<t t-esc="invoice.company_id.zip"/>
|
||||
<t t-esc="invoice.company_id.city"/>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="voucher-bank" t-if="not print_bank or not invoice.company_id.l10n_ch_isr_preprinted_account">
|
||||
<!--Konto/Compte/Conto-->
|
||||
<p id="voucher-bank_ref" t-field="invoice.l10n_ch_isr_subscription_formatted"/>
|
||||
</div>
|
||||
|
||||
<p id="voucher-amount_units" t-esc="split_total_amount[0]"/>
|
||||
<p id="voucher-amount_cents" t-esc="split_total_amount[1]"/>
|
||||
|
||||
<div id="voucher-by">
|
||||
<!--Einbezahlt von/Versé par/Versato da-->
|
||||
<p id="voucher-by_reference_number" t-field="invoice.l10n_ch_isr_number"/>
|
||||
<address id="voucher-by_customer_address" t-field="invoice.partner_id" t-options='{"widget": "contact", "fields": ["address","name"], "no_marker": True}' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Slip, right part of the ISR.-->
|
||||
<div id="slip">
|
||||
<!--Einzahlung für/Versement pour/Versamento per-->
|
||||
|
||||
<!--If we use the alternate ISR layout, displaying name
|
||||
and location of the bank.-->
|
||||
<t t-if="print_bank">
|
||||
<div id="slip-for-bank">
|
||||
<p t-if="not invoice.company_id.l10n_ch_isr_preprinted_bank">
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.name"/><br />
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.zip"/>
|
||||
<t t-esc="invoice.partner_bank_id.bank_id.city"/>
|
||||
</p>
|
||||
</div>
|
||||
<!--Zugunsten von/En faveur de/A favore di-->
|
||||
</t>
|
||||
|
||||
<div id="slip-for-contact">
|
||||
<p id="slip-for_name" t-field="invoice.company_id.display_name"/>
|
||||
<p id="slip-for_address1" t-field="invoice.company_id.street"/>
|
||||
<p id="slip-for_address2" t-field="invoice.company_id.street2"/>
|
||||
<p id="slip-for_address3">
|
||||
<t t-esc="invoice.company_id.zip"/>
|
||||
<t t-esc="invoice.company_id.city"/>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="slip-bank" t-if="not print_bank or not invoice.company_id.l10n_ch_isr_preprinted_account">
|
||||
<!--Konto/Compte/Conto-->
|
||||
<!--aka ISR Subscriber number provided by the financial institution-->
|
||||
<p id="slip-bank_ref" t-field="invoice.l10n_ch_isr_subscription_formatted"/>
|
||||
</div>
|
||||
|
||||
<p id="slip-amount_units" t-esc="split_total_amount[0]"/>
|
||||
<p id="slip-amount_cents" t-esc="split_total_amount[1]"/>
|
||||
|
||||
<div id="slip-reference">
|
||||
<!--Referenz-Nr./N°de référence/N°di riferimento-->
|
||||
<p id="slip-reference_number" t-field="invoice.l10n_ch_isr_number_spaced"/>
|
||||
</div>
|
||||
|
||||
<div id="slip-by">
|
||||
<!--Einbezahlt von/Versé par/Versato da-->
|
||||
<address id="slip-by_customer_address" t-field="invoice.partner_id" t-options='{"widget": "contact", "fields": ["address","name"], "no_marker": True}' />
|
||||
</div>
|
||||
|
||||
<div id="slip-optical-line">
|
||||
<!--Optical reference-->
|
||||
<div t-attf-style="top: {{ invoice.company_id.l10n_ch_isr_scan_line_top }}mm; left: {{ invoice.company_id.l10n_ch_isr_scan_line_left }}mm;">
|
||||
<div t-foreach="invoice.l10n_ch_isr_optical_line" t-as="char" t-esc="char" t-attf-style="right: {{ round((char_size - char_index - 1) * 0.1, 1) }}in"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="l10n_ch.isr_report_main">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="invoice">
|
||||
<t t-set="o" t-value="invoice"/>
|
||||
<t t-call="l10n_ch.l10n_ch_isr_report_template"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
# -*- coding:utf-8 -*-
|
||||
from odoo import api, models
|
||||
|
||||
class ReportSwissQR(models.AbstractModel):
|
||||
|
||||
class ReportL10n_ChQr_Report_Main(models.AbstractModel):
|
||||
_name = 'report.l10n_ch.qr_report_main'
|
||||
_description = 'Swiss QR-bill report'
|
||||
|
||||
|
|
@ -11,7 +12,7 @@ class ReportSwissQR(models.AbstractModel):
|
|||
|
||||
qr_code_urls = {}
|
||||
for invoice in docs:
|
||||
qr_code_urls[invoice.id] = invoice.partner_bank_id.build_qr_code_base64(invoice.amount_residual, invoice.ref or invoice.name, invoice.payment_reference, invoice.currency_id, invoice.partner_id, qr_method='ch_qr', silent_errors=False)
|
||||
qr_code_urls[invoice.id] = invoice.partner_bank_id.build_qr_code_base64(invoice.amount_residual, invoice.payment_reference or invoice.name, invoice.payment_reference, invoice.currency_id, invoice.partner_id, qr_method='ch_qr', silent_errors=False)
|
||||
|
||||
return {
|
||||
'doc_ids': docids,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="paperformat_euro_no_margin" model="report.paperformat">
|
||||
<field name="name">European A4 without borders</field>
|
||||
<field name="default" eval="False" />
|
||||
<field name="format">A4</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">0</field>
|
||||
<field name="margin_bottom">0</field>
|
||||
<field name="margin_left">0</field>
|
||||
<field name="margin_right">0</field>
|
||||
<field name="header_line" eval="False" />
|
||||
<field name="header_spacing">0</field>
|
||||
</record>
|
||||
|
||||
<record id="l10n_ch_qr_report" model="ir.actions.report">
|
||||
<field name="name">QR-bill</field>
|
||||
|
|
@ -12,31 +24,14 @@
|
|||
<field name="paperformat_id" ref="l10n_ch.paperformat_euro_no_margin"/>
|
||||
</record>
|
||||
|
||||
<record id="l10n_ch_qr_header" model="ir.actions.report">
|
||||
<field name="name">QR-bill Header</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">l10n_ch.qr_report_header</field>
|
||||
<field name="report_file">l10n_ch.qr_report_header</field>
|
||||
</record>
|
||||
|
||||
<template id="l10n_ch_header_template">
|
||||
<t t-call="web.external_layout">
|
||||
<!--The following elements are necessary for the header to be displayed correctly.-->
|
||||
<br/>
|
||||
<p>&nbsp;</p>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="l10n_ch_swissqr_template">
|
||||
<div class="article" t-att-data-oe-model="o._name" t-att-data-oe-id="o.id">
|
||||
<t t-set="o" t-value="o.with_context(lang=lang)"/>
|
||||
<t t-set="company" t-value="o.company_id"/>
|
||||
<t t-set="company" t-value="o.partner_bank_id.partner_id or o.company_id"/>
|
||||
<t t-set="formated_amount" t-value="'{:,.2f}'.format(o.amount_residual).replace(',','\xa0')"/>
|
||||
|
||||
<t t-set="is_qrr" t-value="o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||
<t t-set="is_scor" t-value="o.partner_bank_id._is_iso11649_reference(o.payment_reference)"/>
|
||||
|
||||
<div class="swissqr_content_v2">
|
||||
|
||||
<div class="swissqr_receipt">
|
||||
|
|
@ -56,11 +51,11 @@
|
|||
<span t-field="o.partner_bank_id.acc_number" t-if="not o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||
<span t-field="o.partner_bank_id.l10n_ch_qr_iban" t-if="o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||
<br/>
|
||||
<span t-esc="o.partner_bank_id.acc_holder_name or o.company_id.name"/><br/>
|
||||
<span t-field="o.company_id.street"/><br/>
|
||||
<span t-field="o.company_id.country_id.code"/>
|
||||
<span t-field="o.company_id.zip"/>
|
||||
<span t-field="o.company_id.city"/><br/>
|
||||
<span t-out="company.name"/><br/>
|
||||
<span t-field="company.street"/><br/>
|
||||
<span t-field="company.country_id.code"/>
|
||||
<span t-field="company.zip"/>
|
||||
<span t-field="company.city"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
|
|
@ -71,13 +66,13 @@
|
|||
</t>
|
||||
<t t-if="is_qrr">
|
||||
<div class="swissqr_text content">
|
||||
<span t-esc="o.space_qrr_reference(o.payment_reference)"/><br/>
|
||||
<span t-out="o.space_qrr_reference(o.payment_reference)"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="is_scor">
|
||||
<div class="swissqr_text content">
|
||||
<span t-esc="o.space_scor_reference(o.payment_reference)"/><br/>
|
||||
<span t-out="o.space_scor_reference(o.payment_reference)"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -111,7 +106,7 @@
|
|||
<span>Amount</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span t-esc="formated_amount"/>
|
||||
<span t-out="formated_amount"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -152,7 +147,7 @@
|
|||
<span>Amount</span><br/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span t-esc="formated_amount"/>
|
||||
<span t-out="formated_amount"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -168,11 +163,11 @@
|
|||
<span t-field="o.partner_bank_id.acc_number" t-if="not o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||
<span t-field="o.partner_bank_id.l10n_ch_qr_iban" t-if="o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||
<br/>
|
||||
<span t-esc="o.partner_bank_id.acc_holder_name or o.company_id.name"/><br/>
|
||||
<span t-field="o.company_id.street"/><br/>
|
||||
<span t-field="o.company_id.country_id.code"/>
|
||||
<span t-field="o.company_id.zip"/>
|
||||
<span t-field="o.company_id.city"/><br/>
|
||||
<span t-out="company.name"/><br/>
|
||||
<span t-field="company.street"/><br/>
|
||||
<span t-field="company.country_id.code"/>
|
||||
<span t-field="company.zip"/>
|
||||
<span t-field="company.city"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
|
|
@ -183,13 +178,13 @@
|
|||
</t>
|
||||
<t t-if="is_qrr">
|
||||
<div class="swissqr_text content">
|
||||
<span t-esc="o.space_qrr_reference(o.payment_reference)"/><br/>
|
||||
<span t-out="o.space_qrr_reference(o.payment_reference)"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="is_scor">
|
||||
<div class="swissqr_text content">
|
||||
<span t-esc="o.space_scor_reference(o.payment_reference)"/><br/>
|
||||
<span t-out="o.space_scor_reference(o.payment_reference)"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -200,7 +195,7 @@
|
|||
<span>Additional information</span>
|
||||
</div>
|
||||
<div class="swissqr_text content">
|
||||
<span t-esc="additional_info"/><br/>
|
||||
<span t-out="additional_info"/><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -232,20 +227,10 @@
|
|||
</t>
|
||||
</template>
|
||||
|
||||
<template id="l10n_ch.qr_report_header">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="invoice">
|
||||
<t t-set="o" t-value="invoice"/>
|
||||
<t t-set="lang" t-value="o.partner_id.lang"/>
|
||||
<t t-call="l10n_ch.l10n_ch_header_template" t-lang="lang"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="minimal_layout_with_report_attribute" inherit_id="web.minimal_layout">
|
||||
<body position="attributes">
|
||||
<attribute name="t-att-data-report-id">report_xml_id</attribute>
|
||||
</body>
|
||||
</template>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 17 KiB |
|
|
@ -1,208 +0,0 @@
|
|||
@font-face {
|
||||
font-family: ocrb;
|
||||
src: url('../font/ocrb.otf') format('opentype');
|
||||
}
|
||||
|
||||
.l10n_ch_isr {
|
||||
/*
|
||||
all elements are positionned for A4 format (210 x 297mm) but the viewport
|
||||
is bigger than this, hence we zoom the whole page to be bigger than the viewport
|
||||
which will then be resized down by wkhtmltopdf to get back to an A4 format
|
||||
*/
|
||||
zoom: 1.25;
|
||||
|
||||
&.o_in_iframe {
|
||||
zoom: 1;
|
||||
|
||||
/* display dummy check bacground in html rendering to help see the end result */
|
||||
#isr {
|
||||
background: url(../img/background_virgin_isr.png) bottom no-repeat;
|
||||
background-size: 100%;
|
||||
|
||||
&.isr-print-bank {
|
||||
background-image: url(../img/background_virgin_isr_bank.png);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* content outside isr needs margins to not overlap header */
|
||||
#content_outside_isr {
|
||||
padding: 15px;
|
||||
padding-top: 150px;
|
||||
}
|
||||
|
||||
/* ISR is intended for pre-printed paper, we don't want stylistic background */
|
||||
.o_report_layout_striped {
|
||||
background: none;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
#isr {
|
||||
height: 106mm;
|
||||
width: 210mm;
|
||||
|
||||
position: absolute;
|
||||
/* position bvr at bottom of page */
|
||||
top: 297 - 106mm;
|
||||
left: 0;
|
||||
|
||||
overflow: hidden;
|
||||
font-family: ocrb;
|
||||
line-height: 0.16in;
|
||||
font-size: 10pt;
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#voucher {
|
||||
height: 4in;
|
||||
width: 2.4in;
|
||||
|
||||
position: absolute;
|
||||
/* header title of BVR section */
|
||||
top: 0.167in;
|
||||
/* right of voucher corresponds to left of slip */
|
||||
right: 5.9in;
|
||||
}
|
||||
|
||||
#voucher > * {
|
||||
position: absolute;
|
||||
/* default left margin for fields content */
|
||||
left: 0.15in;
|
||||
|
||||
&#voucher-for-contact {
|
||||
top: 0.25in;
|
||||
}
|
||||
|
||||
&#voucher-for-bank {
|
||||
top: 0.18in;
|
||||
}
|
||||
|
||||
&#voucher-for-bank + #voucher-for-contact {
|
||||
top: 0.68in;
|
||||
}
|
||||
|
||||
&#voucher-bank {
|
||||
top: 1.51in;
|
||||
left: 1.1in;
|
||||
}
|
||||
|
||||
&#voucher-amount_units {
|
||||
width: 1.62in;
|
||||
top: 1.87in;
|
||||
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.095in;
|
||||
}
|
||||
|
||||
&#voucher-amount_cents {
|
||||
width: 0.4in;
|
||||
top: 1.87in;
|
||||
left: 1.96in;
|
||||
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.095in;
|
||||
}
|
||||
|
||||
&#voucher-by {
|
||||
top: 2.22in;
|
||||
font-size: 9pt;
|
||||
max-width: 2in;
|
||||
|
||||
#voucher-by_reference_number {
|
||||
font-size: 7.5pt;
|
||||
margin-bottom: 0.05in;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#slip {
|
||||
height: 4in;
|
||||
width: 5.9in;
|
||||
|
||||
position: absolute;
|
||||
/* header title of BVR section */
|
||||
top: 0.167in;
|
||||
/* right of slip corresponds to right of slip */
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#slip > * {
|
||||
position: absolute;
|
||||
/* default left margin for fields content */
|
||||
left: 0.15in;
|
||||
|
||||
&#slip-for-contact {
|
||||
top: 0.25in;
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&#slip-for-bank {
|
||||
top: 0.18in;
|
||||
}
|
||||
|
||||
&#slip-for-bank + #slip-for-contact {
|
||||
top: 0.68in;
|
||||
}
|
||||
|
||||
&#slip-bank {
|
||||
top: 1.51in;
|
||||
left: 1.1in;
|
||||
}
|
||||
|
||||
&#slip-amount_units {
|
||||
width: 1.62in;
|
||||
top: 1.87in;
|
||||
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.095in;
|
||||
}
|
||||
|
||||
&#slip-amount_cents {
|
||||
width: 0.4in;
|
||||
top: 1.87in;
|
||||
left: 1.96in;
|
||||
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.095in;
|
||||
}
|
||||
|
||||
&#slip-reference {
|
||||
width: 3.3in;
|
||||
top: 1.2in;
|
||||
left: 2.5in;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&#slip-by {
|
||||
top: 1.85in;
|
||||
left: 2.55in;
|
||||
}
|
||||
|
||||
&#slip-optical-line {
|
||||
right: 0.32in;
|
||||
bottom: 0.667in;
|
||||
|
||||
/* Positioning is set for OCRB of Tsukurimashou Font Family */
|
||||
font-family: ocrb;
|
||||
font-size: 10pt;
|
||||
line-height: 0.1in;
|
||||
|
||||
> div {
|
||||
position: relative;
|
||||
|
||||
> div {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,8 +3,5 @@
|
|||
|
||||
from . import test_ch_qr_code
|
||||
from . import test_swissqr
|
||||
from . import test_l10n_ch_isr_print
|
||||
from . import test_l10n_ch_qr_print
|
||||
from . import test_vendor_bill_isr
|
||||
from . import test_onchange_l10n_ch_postal
|
||||
from . import test_gen_isr_reference
|
||||
from . import test_gen_qrr_reference
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
# -*- coding:utf-8 -*-
|
||||
|
||||
from reportlab.graphics.barcode import createBarcodeDrawing
|
||||
|
||||
from odoo import Command
|
||||
from odoo.tests import tagged
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tools.barcode import createBarcodeDrawing
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
|
||||
|
||||
|
|
@ -14,11 +11,11 @@ class TestSwissQRCode(AccountTestInvoicingCommon):
|
|||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_ch.l10nch_chart_template'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
@AccountTestInvoicingCommon.setup_country('ch')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
cls.company_data['company'].qr_code = True
|
||||
cls.company_data['company'].country_id = None
|
||||
|
||||
cls.swiss_iban = cls.env['res.partner.bank'].create({
|
||||
'acc_number': 'CH15 3881 5158 3845 3843 7',
|
||||
|
|
@ -60,6 +57,9 @@ class TestSwissQRCode(AccountTestInvoicingCommon):
|
|||
"""
|
||||
self.ch_qr_invoice.qr_code_method = 'ch_qr'
|
||||
|
||||
# flush manually to have the right env to get possible values of `qr_code_method`
|
||||
self.env.flush_all()
|
||||
|
||||
# First check with a regular IBAN
|
||||
with self.assertRaises(UserError, msg="It shouldn't be possible to generate a Swiss QR-code for partners without a complete Swiss address."):
|
||||
self.ch_qr_invoice._generate_qr_code()
|
||||
|
|
@ -83,6 +83,24 @@ class TestSwissQRCode(AccountTestInvoicingCommon):
|
|||
self.ch_qr_invoice.company_id.partner_id.country_id = self.env.ref('base.fr')
|
||||
self.ch_qr_invoice._generate_qr_code()
|
||||
|
||||
def test_qr_code_generation_with_newlines(self):
|
||||
""" Check that the generated QR removes newlines from field content, as newlines
|
||||
shift the field content causing the submitted QR code to be rejected.
|
||||
"""
|
||||
# add the address with a newline
|
||||
self._assign_partner_address(self.ch_qr_invoice.company_id.partner_id)
|
||||
self._assign_partner_address(self.ch_qr_invoice.partner_id)
|
||||
self.ch_qr_invoice.partner_id.write({"street2": "123 \nStreet"})
|
||||
|
||||
# generate the field values, instead of the QR image.
|
||||
unstruct_ref = self.ch_qr_invoice.ref and self.ch_qr_invoice.ref or self.ch_qr_invoice.name
|
||||
vals = self.ch_qr_invoice.partner_bank_id._build_qr_code_vals(
|
||||
self.ch_qr_invoice.amount_residual, unstruct_ref, self.ch_qr_invoice.payment_reference,
|
||||
self.ch_qr_invoice.currency_id, self.ch_qr_invoice.partner_id, self.ch_qr_invoice.qr_code_method)
|
||||
value_list = self.ch_qr_invoice.partner_bank_id._get_qr_vals(**vals)
|
||||
|
||||
self.assertEqual(''.join(value_list).count('\n'), 0, "Each element of the Swiss QR-code must be contained on one line.")
|
||||
|
||||
def test_ch_qr_code_detection(self):
|
||||
""" Checks Swiss QR-code auto-detection when no specific QR-method
|
||||
is given to the invoice.
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
from odoo.tests import tagged
|
||||
|
||||
QR_IBAN = 'CH21 3080 8001 2345 6782 7'
|
||||
ISR_SUBS_NUMBER = "01-162-8"
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class TestGenISRReference(AccountTestInvoicingCommon):
|
||||
"""Check condition of generation of and content of the structured ref"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref="l10n_ch.l10nch_chart_template"):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.bank = cls.env["res.bank"].create(
|
||||
{
|
||||
"name": "Alternative Bank Schweiz AG",
|
||||
"bic": "ALSWCH21XXX",
|
||||
}
|
||||
)
|
||||
cls.bank_acc_isr = cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"acc_number": "ISR",
|
||||
"l10n_ch_isr_subscription_chf": "01-162-8",
|
||||
"bank_id": cls.bank.id,
|
||||
"partner_id": cls.partner_a.id,
|
||||
}
|
||||
)
|
||||
cls.bank_acc_qriban = cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"acc_number": QR_IBAN,
|
||||
"bank_id": cls.bank.id,
|
||||
"partner_id": cls.partner_a.id,
|
||||
}
|
||||
)
|
||||
cls.product_a.taxes_id = cls.product_b.taxes_id = None
|
||||
cls.invoice = cls.init_invoice("out_invoice", products=cls.product_a+cls.product_b)
|
||||
|
||||
def test_isr(self):
|
||||
|
||||
self.invoice.partner_bank_id = self.bank_acc_isr
|
||||
self.invoice.name = "INV/01234567890"
|
||||
# Post invoice to have the expected amount due (amount_residual)
|
||||
self.invoice.action_post()
|
||||
|
||||
expected_isr = "000000000000000012345678903"
|
||||
expected_isr_spaced = "00 00000 00000 00001 23456 78903"
|
||||
expected_optical_line = "0100001297203>000000000000000012345678903+ 010001628>"
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number, expected_isr)
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number_spaced, expected_isr_spaced)
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_optical_line, expected_optical_line)
|
||||
|
||||
def test_qrr(self):
|
||||
self.invoice.partner_bank_id = self.bank_acc_qriban
|
||||
|
||||
self.invoice.name = "INV/01234567890"
|
||||
|
||||
expected_isr = "000000000000000012345678903"
|
||||
expected_isr_spaced = "00 00000 00000 00001 23456 78903"
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number, expected_isr)
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number_spaced, expected_isr_spaced)
|
||||
# No need to check optical line, we have no use for it with QR-bill
|
||||
|
||||
def test_isr_long_reference(self):
|
||||
self.invoice.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
self.invoice.name = "INV/123456789012345678901234567890"
|
||||
# Post invoice to have the expected amount due (amount_residual)
|
||||
self.invoice.action_post()
|
||||
|
||||
expected_isr = "567890123456789012345678901"
|
||||
expected_isr_spaced = "56 78901 23456 78901 23456 78901"
|
||||
expected_optical_line = "0100001297203>567890123456789012345678901+ 010001628>"
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number, expected_isr)
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_number_spaced, expected_isr_spaced)
|
||||
self.assertEqual(self.invoice.l10n_ch_isr_optical_line, expected_optical_line)
|
||||
|
||||
def test_missing_isr_subscription_num(self):
|
||||
self.bank_acc_isr.l10n_ch_isr_subscription_chf = False
|
||||
|
||||
self.invoice.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number_spaced)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_optical_line)
|
||||
|
||||
def test_missing_isr_subscription_num_in_wrong_field(self):
|
||||
self.bank_acc_isr.l10n_ch_isr_subscription_chf = False
|
||||
self.bank_acc_isr.l10n_ch_postal = ISR_SUBS_NUMBER
|
||||
|
||||
self.invoice.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number_spaced)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_optical_line)
|
||||
|
||||
def test_no_bank_account(self):
|
||||
self.invoice.partner_bank_id = False
|
||||
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number_spaced)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_optical_line)
|
||||
|
||||
def test_wrong_currency(self):
|
||||
self.invoice.partner_bank_id = self.bank_acc_isr
|
||||
self.invoice.currency_id = self.env.ref("base.BTN")
|
||||
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_number_spaced)
|
||||
self.assertFalse(self.invoice.l10n_ch_isr_optical_line)
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import Command
|
||||
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
from odoo.tests import tagged
|
||||
|
||||
QR_IBAN = 'CH21 3080 8001 2345 6782 7'
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class TestGenQRRReference(AccountTestInvoicingCommon):
|
||||
"""Check condition of generation of and content of the structured ref"""
|
||||
|
||||
@classmethod
|
||||
@AccountTestInvoicingCommon.setup_country('ch')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.bank = cls.env["res.bank"].create(
|
||||
{
|
||||
"name": "Alternative Bank Schweiz AG",
|
||||
"bic": "ALSWCH21XXX",
|
||||
}
|
||||
)
|
||||
cls.partner = cls.env['res.partner'].create({
|
||||
'name': 'Bobby',
|
||||
'country_id': cls.env.ref('base.ch').id,
|
||||
})
|
||||
cls.bank_acc_qriban = cls.env["res.partner.bank"].create(
|
||||
{
|
||||
"acc_number": QR_IBAN,
|
||||
"bank_id": cls.bank.id,
|
||||
"partner_id": cls.partner.id,
|
||||
}
|
||||
)
|
||||
cls.qr_bank_account = cls.env['res.partner.bank'].create({
|
||||
'acc_number': "CH4431999123000889012",
|
||||
'partner_id': cls.partner.id,
|
||||
})
|
||||
|
||||
cls.invoice = cls.init_invoice("out_invoice", products=cls.product_a+cls.product_b)
|
||||
|
||||
def test_qrr(self):
|
||||
test_invoice = self.env['account.move'].create({
|
||||
'move_type': 'out_invoice',
|
||||
'partner_id': self.partner.id,
|
||||
'partner_bank_id': self.bank_acc_qriban.id,
|
||||
'currency_id': self.env.ref('base.EUR').id,
|
||||
'invoice_date': '2019-01-01',
|
||||
'invoice_line_ids': [Command.create({'product_id': self.product_a.id})],
|
||||
})
|
||||
test_invoice.name = "INV/01234567890"
|
||||
expected_qrr = "000000000000000012345678903"
|
||||
self.assertEqual(test_invoice.get_l10n_ch_qrr_number(), expected_qrr)
|
||||
|
||||
def test_qrr_long_reference(self):
|
||||
test_invoice = self.env['account.move'].create({
|
||||
'move_type': 'out_invoice',
|
||||
'partner_id': self.partner.id,
|
||||
'partner_bank_id': self.bank_acc_qriban.id,
|
||||
'currency_id': self.env.ref('base.EUR').id,
|
||||
'invoice_date': '2019-01-01',
|
||||
'invoice_line_ids': [Command.create({'product_id': self.product_a.id})],
|
||||
})
|
||||
test_invoice.name = "INV/123456789012345678901234567890"
|
||||
expected_qrr = "567890123456789012345678901"
|
||||
self.assertEqual(test_invoice.get_l10n_ch_qrr_number(), expected_qrr)
|
||||
|
||||
def test_no_bank_account(self):
|
||||
self.invoice.partner_bank_id = False
|
||||
self.assertFalse(self.invoice.get_l10n_ch_qrr_number())
|
||||
|
||||
def test_wrong_currency(self):
|
||||
self.invoice.partner_bank_id = self.bank_acc_qriban
|
||||
self.invoice.currency_id = self.env.ref("base.BTN")
|
||||
self.assertFalse(self.invoice.get_l10n_ch_qrr_number())
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
from odoo.tests import tagged
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class ISRTest(AccountTestInvoicingCommon):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_ch.l10nch_chart_template'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
|
||||
def print_isr(self, invoice):
|
||||
try:
|
||||
invoice.action_invoice_sent()
|
||||
return True
|
||||
except ValidationError:
|
||||
return False
|
||||
|
||||
def test_l10n_ch_postals(self):
|
||||
|
||||
def assertBankAccountValid(account_number, expected_account_type, expected_postal=None):
|
||||
partner_bank = self.env['res.partner.bank'].create({
|
||||
'acc_number': account_number,
|
||||
'partner_id': self.partner_a.id,
|
||||
})
|
||||
expected_vals = {'acc_type': expected_account_type}
|
||||
if expected_postal is not None:
|
||||
expected_vals['l10n_ch_postal'] = expected_postal
|
||||
|
||||
self.assertRecordValues(partner_bank, [expected_vals])
|
||||
|
||||
assertBankAccountValid('010391391', 'postal', expected_postal='010391391')
|
||||
assertBankAccountValid('CH6309000000250097798', 'iban', expected_postal='25-9779-8')
|
||||
assertBankAccountValid('GR1601101250000000012300695', 'iban', expected_postal=False)
|
||||
|
||||
partner_bank = self.env['res.partner.bank'].create({
|
||||
'acc_number': '010391394',
|
||||
'partner_id': self.partner_a.id,
|
||||
})
|
||||
self.assertNotEqual(partner_bank.acc_type, 'postal')
|
||||
|
||||
def test_isr(self):
|
||||
isr_bank_account = self.env['res.partner.bank'].create({
|
||||
'acc_number': "ISR {} number",
|
||||
'partner_id': self.env.company.partner_id.id,
|
||||
'l10n_ch_isr_subscription_chf': '01-39139-1',
|
||||
})
|
||||
|
||||
invoice_chf = self.env['account.move'].create({
|
||||
'move_type': 'out_invoice',
|
||||
'partner_id': self.partner_a.id,
|
||||
'partner_bank_id': isr_bank_account.id,
|
||||
'currency_id': self.env.ref('base.CHF').id,
|
||||
'invoice_date': '2019-01-01',
|
||||
'invoice_line_ids': [(0, 0, {'product_id': self.product_a.id})],
|
||||
})
|
||||
invoice_chf.action_post()
|
||||
self.assertTrue(self.print_isr(invoice_chf))
|
||||
self.env.ref('base.EUR').active = True
|
||||
invoice_eur = self.env['account.move'].create({
|
||||
'move_type': 'out_invoice',
|
||||
'partner_id': self.partner_a.id,
|
||||
'partner_bank_id': isr_bank_account.id,
|
||||
'currency_id': self.env.ref('base.EUR').id,
|
||||
'invoice_date': '2019-01-01',
|
||||
'invoice_line_ids': [(0, 0, {'product_id': self.product_a.id})],
|
||||
})
|
||||
invoice_eur.action_post()
|
||||
#a normal invoice will still get printed
|
||||
self.assertTrue(self.print_isr(invoice_eur))
|
||||
# However, a isr bill can't be printed with those infos
|
||||
self.assertFalse(invoice_eur.l10n_ch_isr_valid)
|
||||
|
|
@ -12,8 +12,9 @@ _logger = logging.getLogger(__name__)
|
|||
class QRPrintTest(AccountTestInvoicingCommon):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_ch.l10nch_chart_template'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
@AccountTestInvoicingCommon.setup_country('ch')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# the partner must be located in Switzerland.
|
||||
cls.partner = cls.env['res.partner'].create({
|
||||
'name': 'Bobby',
|
||||
|
|
@ -23,7 +24,7 @@ class QRPrintTest(AccountTestInvoicingCommon):
|
|||
cls.qr_bank_account = cls.env['res.partner.bank'].create({
|
||||
'acc_number': "CH4431999123000889012",
|
||||
'partner_id': cls.env.company.partner_id.id,
|
||||
'l10n_ch_isr_subscription_chf': '01-39139-1',
|
||||
'allow_out_payment': True,
|
||||
})
|
||||
cls.correct_invoice_chf = cls.env['account.move'].create({
|
||||
'move_type': 'out_invoice',
|
||||
|
|
@ -57,7 +58,7 @@ class QRPrintTest(AccountTestInvoicingCommon):
|
|||
invoice.action_invoice_sent()
|
||||
return True
|
||||
except UserError as e:
|
||||
_logger.warning(e.name)
|
||||
_logger.warning(str(e))
|
||||
return False
|
||||
|
||||
def test_print_qr(self):
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests.common import Form, TransactionCase
|
||||
|
||||
|
||||
CH_ISR_ISSUER = '01-162-8'
|
||||
CH_IBAN = 'CH15 3881 5158 3845 3843 7'
|
||||
FR_IBAN = 'FR83 8723 4133 8709 9079 4002 530'
|
||||
CH_POST_IBAN = 'CH09 0900 0000 1000 8060 7'
|
||||
CH_POSTAL_ACC = '10-8060-7'
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class TestOnchangePostal(TransactionCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
|
||||
cls.partner = cls.env['res.partner'].create({
|
||||
'name': 'Swiss Company',
|
||||
'street': 'Route de Berne 41',
|
||||
'zip': '1000',
|
||||
'city': 'Lausanne',
|
||||
'is_company': 1,
|
||||
'country_id': cls.env.ref('base.ch').id,
|
||||
})
|
||||
cls.ch_bank = cls.env['res.bank'].create({
|
||||
'name': 'Alternative Bank Schweiz AG',
|
||||
'bic': 'ALSWCH21XXX',
|
||||
})
|
||||
cls.post_bank = cls.env['res.bank'].search(
|
||||
[('bic', '=', 'POFICHBEXXX')])
|
||||
if not cls.post_bank:
|
||||
cls.post_bank = cls.env['res.bank'].create({
|
||||
'name': 'PostFinance AG',
|
||||
'bic': 'POFICHBEXXX',
|
||||
})
|
||||
|
||||
def new_partner_bank_form(self):
|
||||
form = Form(
|
||||
self.env['res.partner.bank'],
|
||||
view="l10n_ch.isr_partner_bank_form",
|
||||
)
|
||||
form.partner_id = self.partner
|
||||
return form
|
||||
|
||||
def test_onchange_acc_number_isr_issuer(self):
|
||||
"""The user entered ISR issuer number into acc_number
|
||||
|
||||
We detect and move it to l10n_ch_postal.
|
||||
It must be moved as it is not unique.
|
||||
"""
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = CH_ISR_ISSUER
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(
|
||||
account.acc_number,
|
||||
"{} {}".format(CH_ISR_ISSUER, self.partner.name)
|
||||
)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_ISR_ISSUER)
|
||||
self.assertEqual(account.acc_type, 'postal')
|
||||
|
||||
def test_onchange_acc_number_postal(self):
|
||||
"""The user entered postal number into acc_number
|
||||
|
||||
We detect and copy it to l10n_ch_postal.
|
||||
"""
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = CH_POSTAL_ACC
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.acc_number, CH_POSTAL_ACC)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL_ACC)
|
||||
self.assertEqual(account.acc_type, 'postal')
|
||||
|
||||
def test_onchange_acc_number_iban_ch(self):
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = CH_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.acc_number, CH_IBAN)
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, 'iban')
|
||||
|
||||
def test_onchange_acc_number_iban_ch_postfinance(self):
|
||||
"""The user enter a postal IBAN, postal number can be deduced"""
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = CH_POST_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.acc_number, CH_POST_IBAN)
|
||||
self.assertEqual(account.l10n_ch_postal, CH_POSTAL_ACC)
|
||||
self.assertEqual(account.acc_type, 'iban')
|
||||
|
||||
def test_onchange_acc_number_iban_foreign(self):
|
||||
"""Check IBAN still works changed"""
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = FR_IBAN
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.acc_number, FR_IBAN)
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, 'iban')
|
||||
|
||||
def test_onchange_acc_number_none(self):
|
||||
"""Check misc format still works"""
|
||||
bank_acc = self.new_partner_bank_form()
|
||||
bank_acc.acc_number = 'anything'
|
||||
account = bank_acc.save()
|
||||
|
||||
self.assertEqual(account.acc_number, 'anything')
|
||||
self.assertFalse(account.l10n_ch_postal)
|
||||
self.assertEqual(account.acc_type, 'bank')
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
import time
|
||||
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tests import tagged
|
||||
from odoo.tools.misc import mod10r
|
||||
|
||||
|
|
@ -15,8 +14,9 @@ QR_IBAN = 'CH21 3080 8001 2345 6782 7'
|
|||
class TestSwissQR(AccountTestInvoicingCommon):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_ch.l10nch_chart_template'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
@AccountTestInvoicingCommon.setup_country('ch')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
def setUp(self):
|
||||
super(TestSwissQR, self).setUp()
|
||||
|
|
@ -89,21 +89,22 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
{
|
||||
'acc_number': number,
|
||||
'partner_id': self.env.user.company_id.partner_id.id,
|
||||
'allow_out_payment': True,
|
||||
}
|
||||
)
|
||||
|
||||
def swissqr_not_generated(self, invoice):
|
||||
""" Prints the given invoice and tests that no Swiss QR generation is triggered. """
|
||||
self.assertFalse(
|
||||
invoice.partner_bank_id._eligible_for_qr_code('ch_qr', invoice.partner_id, invoice.currency_id),
|
||||
self.assertTrue(
|
||||
invoice.partner_bank_id._get_error_messages_for_qr('ch_qr', invoice.partner_id, invoice.currency_id),
|
||||
'No Swiss QR should be generated for this invoice',
|
||||
)
|
||||
|
||||
def swissqr_generated(self, invoice, ref_type='NON'):
|
||||
""" Ensure correct params for Swiss QR generation. """
|
||||
|
||||
self.assertTrue(
|
||||
invoice.partner_bank_id._eligible_for_qr_code('ch_qr', invoice.partner_id, invoice.currency_id), 'A Swiss QR can be generated'
|
||||
self.assertFalse(
|
||||
invoice.partner_bank_id._get_error_messages_for_qr('ch_qr', invoice.partner_id, invoice.currency_id), 'A Swiss QR can be generated'
|
||||
)
|
||||
|
||||
if ref_type == 'QRR':
|
||||
|
|
@ -120,20 +121,22 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
"0200\n"
|
||||
"1\n"
|
||||
"{iban}\n"
|
||||
"K\n"
|
||||
"S\n"
|
||||
"company_1_data\n"
|
||||
"Route de Berne 88\n"
|
||||
"2000 Neuchâtel\n"
|
||||
"\n\n"
|
||||
"Route de Berne\n"
|
||||
"88\n"
|
||||
"2000\n"
|
||||
"Neuchâtel\n"
|
||||
"CH\n"
|
||||
"\n\n\n\n\n\n\n"
|
||||
"42.00\n"
|
||||
"CHF\n"
|
||||
"K\n"
|
||||
"S\n"
|
||||
"Partner\n"
|
||||
"Route de Berne 41\n"
|
||||
"1000 Lausanne\n"
|
||||
"\n\n"
|
||||
"Route de Berne\n"
|
||||
"41\n"
|
||||
"1000\n"
|
||||
"Lausanne\n"
|
||||
"CH\n"
|
||||
"{ref_type}\n"
|
||||
"{struct_ref}\n"
|
||||
|
|
@ -151,7 +154,7 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
'barLevel': 'M',
|
||||
'width': 256,
|
||||
'height': 256,
|
||||
'quiet': 1,
|
||||
'quiet': 0,
|
||||
'mask': 'ch_cross',
|
||||
'value': payload,
|
||||
}
|
||||
|
|
@ -163,11 +166,8 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
self.assertEqual(params, expected_params)
|
||||
|
||||
def test_swissQR_missing_bank(self):
|
||||
# Let us test the generation of a SwissQR for an invoice, first by showing an
|
||||
# QR is included in the invoice is only generated when Odoo has all the data it needs.
|
||||
with self.assertRaises(UserError), self.cr.savepoint():
|
||||
self.invoice1.action_post()
|
||||
self.swissqr_not_generated(self.invoice1)
|
||||
self.invoice1.action_post()
|
||||
self.swissqr_not_generated(self.invoice1)
|
||||
|
||||
def test_swissQR_iban(self):
|
||||
# Now we add an account for payment to our invoice
|
||||
|
|
@ -185,13 +185,14 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
self.invoice1.action_post()
|
||||
self.swissqr_generated(self.invoice1, ref_type="QRR")
|
||||
|
||||
def test_swiss_order_reference_isr_for_qr_code(self):
|
||||
def test_swiss_order_reference_qrr_for_qr_code(self):
|
||||
"""
|
||||
Test that the order reference is correctly generated for QR-Code
|
||||
We summon the skipTest if Sale is not installed (instead of creating a whole module for one test)
|
||||
"""
|
||||
if 'sale.order' not in self.env:
|
||||
self.skipTest('`sale` is not installed')
|
||||
self.env.user.group_ids += self.env.ref('sales_team.group_sale_salesman')
|
||||
|
||||
payment_custom = self.env['ir.module.module']._get('payment_custom')
|
||||
if payment_custom.state != 'installed':
|
||||
|
|
@ -213,11 +214,13 @@ class TestSwissQR(AccountTestInvoicingCommon):
|
|||
})
|
||||
payment_transaction = self.env['payment.transaction'].create({
|
||||
'provider_id': provider.id,
|
||||
'payment_method_id': self.env.ref('payment.payment_method_unknown').id,
|
||||
'sale_order_ids': [order.id],
|
||||
'partner_id': self.env['res.partner'].search([("name", '=', 'Partner')])[0].id,
|
||||
'amount': 100,
|
||||
'currency_id': self.env.company.currency_id.id,
|
||||
})
|
||||
payment_transaction._set_pending()
|
||||
payment_transaction._post_process()
|
||||
|
||||
self.assertEqual(order.reference, mod10r(order.reference[:-1]))
|
||||
|
|
|
|||
|
|
@ -1,124 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo.tests import Form, common, tagged
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
CH_ISR_SUBSCRIPTION = "01-162-8"
|
||||
CH_POSTAL = "10-8060-7"
|
||||
CH_IBAN = "CH15 3881 5158 3845 3843 7"
|
||||
ISR_REFERENCE_GOOD = "16 00011 23456 78901 23456 78901"
|
||||
ISR_REFERENCE_ZEROS = "00 00000 00000 00001 23456 78903"
|
||||
ISR_REFERENCE_NO_ZEROS = "1 23456 78903"
|
||||
ISR_REFERENCE_BAD = "11 11111 11111 11111 11111 11111"
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class TestVendorBillISR(common.TransactionCase):
|
||||
"""Check we can encode Vendor bills with ISR references
|
||||
|
||||
The ISR is a structured reference with a checksum.
|
||||
User are guided to ensure they don't encode wrong ISR references.
|
||||
Only vendors with ISR issuer accounts send ISR references.
|
||||
|
||||
ISR references can be received at least till 2022.
|
||||
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestVendorBillISR, cls).setUpClass()
|
||||
cls.abs_bank = cls.env["res.bank"].create(
|
||||
{"name": "Alternative Bank Schweiz", "bic": "ABSOCH22XXX"}
|
||||
)
|
||||
cls.supplier1 = cls.env["res.partner"].create({"name": "Supplier ISR"})
|
||||
cls.supplier2 = cls.env["res.partner"].create({"name": "Supplier postal"})
|
||||
cls.supplier3 = cls.env["res.partner"].create({"name": "Supplier IBAN"})
|
||||
|
||||
cls.bank_acc_isr = cls.env['res.partner.bank'].create({
|
||||
"acc_number": "ISR 01-162-8 Supplier ISR",
|
||||
"partner_id": cls.supplier1.id,
|
||||
"l10n_ch_postal": CH_ISR_SUBSCRIPTION,
|
||||
})
|
||||
cls.bank_acc_postal = cls.env['res.partner.bank'].create({
|
||||
"acc_number": CH_POSTAL,
|
||||
"partner_id": cls.supplier2.id,
|
||||
"l10n_ch_postal": CH_POSTAL,
|
||||
})
|
||||
cls.bank_acc_iban = cls.env['res.partner.bank'].create({
|
||||
"acc_number": CH_IBAN,
|
||||
"partner_id": cls.supplier2.id,
|
||||
"l10n_ch_postal": False,
|
||||
})
|
||||
|
||||
def test_isr_ref(self):
|
||||
"""Enter ISR reference with ISR subscription account number
|
||||
|
||||
The vendor bill can be saved.
|
||||
"""
|
||||
self.env.company.country_id = self.env.ref('base.ch')
|
||||
self.env.company.account_fiscal_country_id = self.env.company.country_id
|
||||
form = Form(self.env["account.move"].with_context(
|
||||
default_move_type="in_invoice"), view="l10n_ch.isr_invoice_form")
|
||||
form.partner_id = self.supplier1
|
||||
form.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
form.payment_reference = ISR_REFERENCE_GOOD
|
||||
invoice = form.save()
|
||||
|
||||
self.assertFalse(invoice.l10n_ch_isr_needs_fixing)
|
||||
|
||||
def test_isr_ref_with_zeros(self):
|
||||
"""Enter ISR reference with ISR subscription account number
|
||||
|
||||
An ISR Reference can have lots of zeros on the left.
|
||||
|
||||
The vendor bill can be saved.
|
||||
"""
|
||||
self.env.company.country_id = self.env.ref('base.ch')
|
||||
self.env.company.account_fiscal_country_id = self.env.company.country_id
|
||||
form = Form(self.env["account.move"].with_context(
|
||||
default_move_type="in_invoice"), view="l10n_ch.isr_invoice_form")
|
||||
form.partner_id = self.supplier1
|
||||
form.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
form.payment_reference = ISR_REFERENCE_ZEROS
|
||||
invoice = form.save()
|
||||
|
||||
self.assertFalse(invoice.l10n_ch_isr_needs_fixing)
|
||||
|
||||
def test_isr_ref_no_zeros(self):
|
||||
"""Enter ISR reference with ISR subscription account number
|
||||
|
||||
An ISR Reference full of zeros can be entered starting by the
|
||||
first non zero digit.
|
||||
|
||||
The vendor bill can be saved.
|
||||
"""
|
||||
self.env.company.country_id = self.env.ref('base.ch')
|
||||
self.env.company.account_fiscal_country_id = self.env.company.country_id
|
||||
form = Form(self.env["account.move"].with_context(
|
||||
default_move_type="in_invoice"), view="l10n_ch.isr_invoice_form")
|
||||
form.partner_id = self.supplier1
|
||||
form.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
form.payment_reference = ISR_REFERENCE_NO_ZEROS
|
||||
invoice = form.save()
|
||||
|
||||
self.assertFalse(invoice.l10n_ch_isr_needs_fixing)
|
||||
|
||||
def test_isr_wrong_ref(self):
|
||||
"""Mistype ISR reference with ISR subscription account number
|
||||
Check it will show the warning
|
||||
"""
|
||||
self.env.company.country_id = self.env.ref('base.ch')
|
||||
self.env.company.account_fiscal_country_id = self.env.company.country_id
|
||||
form = Form(self.env["account.move"].with_context(
|
||||
default_move_type="in_invoice"), view="l10n_ch.isr_invoice_form")
|
||||
form.partner_id = self.supplier1
|
||||
form.partner_bank_id = self.bank_acc_isr
|
||||
|
||||
form.payment_reference = ISR_REFERENCE_BAD
|
||||
invoice = form.save()
|
||||
|
||||
self.assertTrue(invoice.l10n_ch_isr_needs_fixing)
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
<?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 expr="//t[@t-set='show_qr']" position="attributes">
|
||||
<attribute name="t-value" add="and o.qr_code_method != 'ch_qr'" separator=" "/>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('invoice_main')]" position="after">
|
||||
<div t-if="o.l10n_ch_is_qr_valid">
|
||||
<div style="page-break-after: always"/>
|
||||
<br/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="l10n_ch_account_payment_form" model="ir.ui.view">
|
||||
<field name="name">l10n_ch.account.payment.form</field>
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<header position="after">
|
||||
<div class="alert alert-warning" role="alert" invisible="not l10n_ch_reference_warning_msg">
|
||||
<field name="l10n_ch_reference_warning_msg"/>
|
||||
</div>
|
||||
</header>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -5,19 +5,15 @@
|
|||
<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.
|
||||
Press Check Invalid Invoices to see a list of the invoices that were printed without a QR.
|
||||
</p>
|
||||
<footer>
|
||||
<button name="print_all_invoices" string="Print All" type="object" class="btn-primary"/>
|
||||
|
|
@ -29,7 +25,6 @@
|
|||
|
||||
<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"/>
|
||||
|
|
|
|||
|
|
@ -7,38 +7,9 @@
|
|||
<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)]}"/>
|
||||
<field name="l10n_ch_qr_iban" invisible="not l10n_ch_display_qr_bank_options"/>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
<?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 'Payment for' title of the ISR.
|
||||
Your address will be moved to the 'in favour of' 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>
|
||||
|
|
@ -7,11 +7,7 @@
|
|||
<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 name="l10n_ch_qr_iban" invisible="not l10n_ch_display_qr_bank_options"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -3,23 +3,21 @@ from odoo import models, fields, api, _
|
|||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class QrInvoiceWizard(models.TransientModel):
|
||||
class L10n_ChQr_InvoiceWizard(models.TransientModel):
|
||||
'''
|
||||
Wizard :
|
||||
When multiple invoices are selected to be printed in the QR-Iban format,
|
||||
this wizard will appear if one or more invoice(s) could not be QR-printed (wrong format...)
|
||||
The user will then be able to print the invoices (in the format available, priority : QR --> ISR --> normal)
|
||||
or to see a list of the non-QR/ISR invoices.
|
||||
The non-QR/ISR invoices will have a note logged in their chatter, detailing the reason of the failure.
|
||||
The user will then be able to print the invoices that couldn't be printed in the QR format in the normal format, or
|
||||
to see a list of those.
|
||||
The non-QR invoices will have a note logged in their chatter, detailing the reason of the failure.
|
||||
'''
|
||||
_name = 'l10n_ch.qr_invoice.wizard'
|
||||
_description = 'Handles problems occurring while creating multiple QR-invoices at once'
|
||||
|
||||
nb_qr_inv = fields.Integer(readonly=True)
|
||||
nb_isr_inv = fields.Integer(readonly=True)
|
||||
nb_classic_inv = fields.Integer(readonly=True)
|
||||
qr_inv_text = fields.Text(readonly=True)
|
||||
isr_inv_text = fields.Text(readonly=True)
|
||||
classic_inv_text = fields.Text(readonly=True)
|
||||
|
||||
@api.model
|
||||
|
|
@ -34,12 +32,12 @@ class QrInvoiceWizard(models.TransientModel):
|
|||
return _("No invoice could be printed in the %s format.", inv_format)
|
||||
if nb_inv == 1:
|
||||
return _("One invoice could be printed in the %s format.", inv_format)
|
||||
return _("%s invoices could be printed in the %s format.", nb_inv, inv_format)
|
||||
return _("%(amount)s invoices could be printed in the %(format)s format.", amount=nb_inv, format=inv_format)
|
||||
|
||||
if not self._context.get('active_ids'):
|
||||
if not self.env.context.get('active_ids'):
|
||||
raise UserError(_("No invoice was found to be printed."))
|
||||
|
||||
invoices = self.env['account.move'].browse(self._context['active_ids'])
|
||||
invoices = self.env['account.move'].browse(self.env.context['active_ids'])
|
||||
companies = invoices.company_id
|
||||
if len(companies) != 1 or companies[0].country_code != 'CH':
|
||||
raise UserError(_("All selected invoices must belong to the same Switzerland company"))
|
||||
|
|
@ -48,12 +46,9 @@ class QrInvoiceWizard(models.TransientModel):
|
|||
dispatched_invoices = invoices._l10n_ch_dispatch_invoices_to_print()
|
||||
results.update({
|
||||
'nb_qr_inv': len(dispatched_invoices['qr']),
|
||||
'nb_isr_inv': len(dispatched_invoices['isr']),
|
||||
'nb_classic_inv': len(dispatched_invoices['classic']),
|
||||
'qr_inv_text': determine_invoices_text(nb_inv=len(dispatched_invoices['qr']), inv_format="QR"),
|
||||
'isr_inv_text': determine_invoices_text(nb_inv=len(dispatched_invoices['isr']), inv_format="ISR"),
|
||||
'classic_inv_text': determine_invoices_text(nb_inv=len(dispatched_invoices['classic']),
|
||||
inv_format="classic"),
|
||||
'classic_inv_text': determine_invoices_text(nb_inv=len(dispatched_invoices['classic']), inv_format="classic"),
|
||||
})
|
||||
return results
|
||||
|
||||
|
|
@ -66,21 +61,18 @@ class QrInvoiceWizard(models.TransientModel):
|
|||
|
||||
def action_view_faulty_invoices(self):
|
||||
'''
|
||||
Open a list view of all the invoices that could not be printed in the QR nor the ISR format.
|
||||
Open a list view of all the invoices that could not be printed in the QR format.
|
||||
'''
|
||||
# Prints the error stopping the invoice from being QR-printed in the invoice's chatter.
|
||||
invoices = self.env['account.move'].browse(self._context['active_ids'])
|
||||
invoices = self.env['account.move'].browse(self.env.context['active_ids'])
|
||||
dispatched_invoices = invoices._l10n_ch_dispatch_invoices_to_print()
|
||||
faulty_invoices = dispatched_invoices['classic']
|
||||
|
||||
# Log a message inside the chatter explaining why the invoice is faulty.
|
||||
for inv in faulty_invoices:
|
||||
try:
|
||||
# The error potentially raised in the following function helps create the wizard's message.
|
||||
inv.partner_bank_id._eligible_for_qr_code('ch_qr', inv.partner_id, inv.currency_id, raises_error=True)
|
||||
except UserError as e:
|
||||
inv.message_post(body=e.name, message_type="comment")
|
||||
|
||||
error_msg = inv.partner_bank_id._get_error_messages_for_qr('ch_qr', inv.partner_id, inv.currency_id)
|
||||
if error_msg:
|
||||
inv.message_post(body=error_msg, message_type="comment")
|
||||
action_vals = {
|
||||
'name': _("Invalid Invoices"),
|
||||
'type': 'ir.actions.act_window',
|
||||
|
|
@ -94,7 +86,7 @@ class QrInvoiceWizard(models.TransientModel):
|
|||
})
|
||||
else:
|
||||
action_vals.update({
|
||||
'view_mode': 'tree',
|
||||
'view_mode': 'list',
|
||||
'domain': [('id', 'in', faulty_invoices.ids)],
|
||||
})
|
||||
return action_vals
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, models
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class SwissSetupBarBankConfigWizard(models.TransientModel):
|
||||
class AccountSetupBankManualConfig(models.TransientModel):
|
||||
_inherit = 'account.setup.bank.manual.config'
|
||||
|
||||
@api.onchange('acc_number')
|
||||
|
|
@ -14,3 +13,10 @@ class SwissSetupBarBankConfigWizard(models.TransientModel):
|
|||
self.res_partner_bank_id.acc_number = self.acc_number
|
||||
self.res_partner_bank_id._compute_l10n_ch_qr_iban()
|
||||
self.l10n_ch_qr_iban = self.res_partner_bank_id.l10n_ch_qr_iban
|
||||
|
||||
l10n_ch_display_qr_bank_options = fields.Boolean(compute='_compute_l10n_ch_display_qr_bank_options')
|
||||
|
||||
@api.depends('partner_id', 'company_id')
|
||||
def _compute_l10n_ch_display_qr_bank_options(self):
|
||||
for wizard in self:
|
||||
wizard.l10n_ch_display_qr_bank_options = wizard.res_partner_bank_id.l10n_ch_display_qr_bank_options
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_ch"
|
||||
version = "16.0.0"
|
||||
description = "Switzerland - Accounting - Odoo addon"
|
||||
description = "Switzerland - Accounting -
|
||||
Odoo addon
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-account>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-l10n_multilang>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-base_iban>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-l10n_din5008>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-account>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-account_edi_ubl_cii>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-base_iban>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-l10n_din5008>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -19,7 +21,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue