From 42a27b24ce64c7552b27d5e693c0724175bd89b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 23 Nov 2022 15:56:17 +0100 Subject: [PATCH 01/16] [OU-ADD] l10n_be: migration scripts --- .../migrations/13.0.2.0/post-migration.py | 982 ++++++++++++++++++ 1 file changed, 982 insertions(+) create mode 100644 addons/l10n_be/migrations/13.0.2.0/post-migration.py diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py new file mode 100644 index 000000000000..d8d928cb1495 --- /dev/null +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -0,0 +1,982 @@ +from openupgradelib import openupgrade +import logging + +_logger = logging.getLogger(__name__) + +ACCOUNT_TAX_NAMES = [ + # In version 9.0 + { + "attn_VAT-OUT-21-S": "21% Services", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% Services", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% Services", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% Services", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocontractant", + "attn_VAT-OUT-00-EU-S": "0% EU Services", + "attn_VAT-OUT-00-EU-L": "0% EU L", + "attn_VAT-OUT-00-EU-T": "0% EU T", + "attn_VAT-OUT-00-ROW": "0% Export Non EU", + "attn_VAT-IN-V81-21": "21% Marchandises", + "attn_VAT-IN-V81-12": "12% Marchandises", + "attn_VAT-IN-V81-06": "6% Marchandises", + "attn_VAT-IN-V81-00": "0% Marchandises", + "attn_VAT-IN-V82-21-S": "21% Services", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% Services", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% Services", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% Services", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 10.0 + { + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 11.0 + { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 12.0 + { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, +] + + +def get_old_account_tax_names(xmlid): + """ + Return a list of old names for the account.tax given matching the + xmlid. + """ + names = [] + for version in ACCOUNT_TAX_NAMES: + name = version.get(xmlid) + if name: + names.append(name) + return names + + +def get_tags(env, repartition_line_tmpl): + """ + Return the tags linked to an account.tax.repartition.line.template + """ + tag_names = [] + for report_line in repartition_line_tmpl.plus_report_line_ids: + tag_names.append("+" + report_line.tag_name) + for report_line in repartition_line_tmpl.minus_report_line_ids: + tag_names.append("-" + report_line.tag_name) + return env["account.account.tag"].search([("name", "in", tag_names)]) + + +def is_account_tax_used(env, account_tax): + """Return True if account_tax is used on an account.move.line.""" + env.cr.execute( + """ + SELECT account_tax_id + FROM account_move_line_account_tax_rel + WHERE account_tax_id = %s + """, + (account_tax.id,), + ) + return len(env.cr.fetchall()) > 0 + + +def find_account_tax(env, xmlid, account_tax_template, company_id): + """Return the account tax based on the given account.tax.template""" + current_name = account_tax_template.name + old_names = get_old_account_tax_names(xmlid) + domain = [ + ("type_tax_use", "=", account_tax_template.type_tax_use), + ("company_id", "=", company_id.id), + ] + + if not old_names: + _logger.info( + "Skipping account.tax.template '%s', because it's a new one.", + current_name, + ) + return env["account.tax"] + + _logger.info( + "Looking for a account.tax that match account.tax.template '%s'.", + current_name + ) + account_taxes = env["account.tax"].search( + domain + [("name", "=", current_name)] + ) + + if not account_taxes: + _logger.info( + "No account.tax named '%s', searching with older names.", + current_name + ) + account_taxes = env["account.tax"].search( + domain + [("name", "in", old_names)] + ) + + nb_account_taxes = len(account_taxes) + account_taxes_used = account_taxes.filtered( + lambda r: is_account_tax_used(env, r) + ) + + if nb_account_taxes > 1: + _logger.info( + "There is several account.tax found for the " + "account.tax.template '%s'. Trying to see which one is " + "realy used.", + current_name, + ) + + nb_account_taxes_used = len(account_taxes_used) + if nb_account_taxes_used > 1: + raise ValueError( + "There is several account.tax found for the " + "account.tax.template ID %s '%s' that are used on " + "account.move.line. Clean up " + "account.tax by renaming your specific account.tax " + "and migrate it via a dedicated script. " + "The matching account.tax ID %s" + % ( + account_tax_template.id, + current_name, + ", ".join(str(rec_id) for rec_id in account_taxes_used.ids) + ) + ) + + account_tax = account_taxes_used + + else: + account_tax = account_taxes + + if not account_tax: + _logger.error( + "No matching account.tax for the account.tax.template '%s'.", + current_name, + ) + else: + _logger.info( + "Using account.tax ID %s '%s' that correspond to the " + "account.tax.template '%s'.", + account_tax.id, + account_tax.name, + current_name, + ) + + return account_tax + + +def find_repartition_line(account_tax, repartition_line_tmpl): + """ + Retrieve the repartition line that match the given repartition + line from the account.tax.template + """ + # Choose to search on invoice repartition lines or refund ones. + if repartition_line_tmpl.invoice_tax_id: + repartition_lines = account_tax.invoice_repartition_line_ids + else: + repartition_lines = account_tax.refund_repartition_line_ids + + repartition_lines = repartition_lines.filtered( + lambda r: r.repartition_type == repartition_line_tmpl.repartition_type + ) + + if len(repartition_lines) > 1: + repartition_lines = repartition_lines.filtered( + lambda r: r.factor_percent == repartition_line_tmpl.factor_percent + ) + + if len(repartition_lines) > 1: + repartition_lines = repartition_lines.filtered( + lambda r: r.account_id == repartition_line_tmpl.account_id + ) + + if not repartition_lines: + # TODO: maybe in this case we need to create the repartition.line ? + # Or we should delegate this to account_chart_update ? + _logger.error( + "No matching account.tax.repartition.line on account.tax ID %s " + "for the account.tax.repartition.line.template ID %s", + account_tax.id, + repartition_line_tmpl.id, + ) + elif len(repartition_lines) > 1: + _logger.error( + "Several matching account.tax.repartition.line on account.tax " + "ID %s for the account.tax.repartition.line.template ID %s." + "Found account.tax.repartition.line ID %s.", + account_tax.id, + repartition_line_tmpl.id, + ", ".join(str(rec_id) for rec_id in repartition_lines.ids), + ) + else: + _logger.info( + "Found matching account.tax.repartition.line ID %s " + "on account.tax ID %s " + "for the account.tax.repartition.line.template ID %s", + repartition_lines.id, + account_tax.id, + repartition_line_tmpl.id, + ) + + return repartition_lines + + +def update_repartition_line(env, repartition_line, repartition_line_tmpl): + """ + Update tag of the account.tax.repartition.line based on + account.tax.repartition.line.template + + Update the following tables: + - account_account_tag_account_tax_repartition_line_rel + - account_account_tag_account_move_line_rel + """ + # FIXME: I'm not sure if the table : + # - account_tax_repartition_financial_tags + # should be updated or not. + + new_tag_ids = get_tags(env, repartition_line_tmpl) + old_tag_ids = repartition_line.tag_ids + + # Update account_account_tag_account_tax_repartition_line_rel + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_tax_repartition_line_rel + WHERE account_tax_repartition_line_id = %s; + """, + (repartition_line.id,) + ) + for new_tag_id in new_tag_ids: + openupgrade.logged_query( + env.cr, + """ + INSERT INTO account_account_tag_account_tax_repartition_line_rel + (account_tax_repartition_line_id, account_account_tag_id) + VALUES (%s, %s) + """, + (repartition_line.id, new_tag_id.id), + ) + + # Update account_account_tag_account_move_line_rel + domain = [ + "|", + ("tax_ids", "=", repartition_line.tax_id.id), + ("tax_line_id", "=", repartition_line.tax_id.id), + ("tax_repartition_line_id", "=", False), + ] + if repartition_line.repartition_type == "base": + # WARNING: Here I'm not sure if an account.move.line with a null + # value as tax_base_amount should be considered equal to zero or + # not. For now, I assume yes. + domain.append("|") + domain.append(("tax_base_amount", "=", 0)) + domain.append(("tax_base_amount", "=", False)) + if repartition_line.repartition_type == "tax": + domain.append(("tax_base_amount", "!=", 0)) + + account_move_line_ids = env["account.move.line"].search(domain) + + # Considering that "out_receipt" and "in_receipt" are not affected + # by tags. + if repartition_line.invoice_tax_id: + account_move_line_ids = account_move_line_ids.filtered( + lambda r: r.move_id.type in ("out_invoice", "in_invoice") + ) + if repartition_line.refund_tax_id: + # WARNING ! Some refund are invoices with a negative amount + # This case is not taken into account. + account_move_line_ids = account_move_line_ids.filtered( + lambda r: r.move_id.type in ("out_refund", "in_refund") + ) + + # Adding account.move.line that are linked to this specific + # repartition_line + account_move_line_ids += env["account.move.line"].search( + [("tax_repartition_line_id", "=", repartition_line.id)] + ) + + if not account_move_line_ids or not old_tag_ids: + return + + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_move_line_rel + WHERE account_move_line_id IN (%s) + AND account_account_tag_id IN (%s) + """ % ( + ",".join(str(rec_id) for rec_id in account_move_line_ids.ids), + ",".join(str(rec_id) for rec_id in old_tag_ids.ids), + ), + ) + for new_tag_id in new_tag_ids: + values = [ + "(%s, %s)" % (aml_id, new_tag_id.id) + for aml_id in account_move_line_ids.ids + ] + openupgrade.logged_query( + env.cr, + """ + INSERT INTO account_account_tag_account_move_line_rel + (account_move_line_id, account_account_tag_id) + VALUES %s + ON CONFLICT DO NOTHING + """ % ",".join(values), + ) + + +def get_account_tax_templates_iterator(env): + """ + Return account.tax.template with their xmlid + """ + module = "l10n_be" + data = env['ir.model.data'].search([ + ('model', '=', 'account.tax.template'), + ('module', 'like', module) + ]) + for elem in data: + account_tax_template = env["account.tax.template"].browse(elem.res_id) + yield elem.name, account_tax_template + + +def apply_new_tax_tags_on_account_tax(env, account_tax, account_tax_template): + """ + The normal migration script of module account tries to link the old + account.account.tag to account.tax.repartition.line. + Which does not reflect the new account.tax.template and new + account.account.tag which comes with positive (debit) and negative + (credit) flavors. + This function replace the old tags by the new ones. + """ + for repartition_line_tmpl in ( + account_tax_template.invoice_repartition_line_ids + + account_tax_template.refund_repartition_line_ids + ): + repartition_line = find_repartition_line( + account_tax, repartition_line_tmpl + ) + if not repartition_line: + _logger.info( + "No account.tax.repartition.line found that match " + "the repartition line ID %s of the account.tax.template " + "ID %s '%s'", + repartition_line_tmpl.id, + account_tax_template.id, + account_tax_template.name, + ) + continue + update_repartition_line(env, repartition_line, repartition_line_tmpl) + + +def update_account_tax(env): + """ + Use account.tax.template to update existing account.tax + """ + for company in env["res.company"].search([]): + for xmlid, account_tax_template in get_account_tax_templates_iterator(env): + account_tax = find_account_tax(env, xmlid, account_tax_template, company) + + if not account_tax: + continue + + apply_new_tax_tags_on_account_tax( + env, account_tax, account_tax_template + ) + + # Rename account_tax + account_tax.name = account_tax_template.name + + +def remove_wrong_tag(env): + """ + Remove tags on account.move.line that are not linked to an + account.tax. + """ + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_move_line_rel + WHERE account_move_line_id IN ( + SELECT id FROM account_move_line + WHERE id NOT IN ( + SELECT DISTINCT account_move_line_id + FROM account_move_line_account_tax_rel + ) + ) + """ + ) + + +def unlink_tags_from_move_line(env, tag_xmlids): + """Unlink tags from account.move.line""" + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_move_line_rel r + WHERE + account_account_tag_id IN ( + SELECT res_id FROM ir_model_data + WHERE + model = 'account.account.tag' AND + module = 'l10n_be' AND + name IN (%s) + ) + """ % ",".join("'"+xmlid+"'" for xmlid in tag_xmlids), + ) + + +def disable_troublesome_tags(env): + """Disable old tags""" + openupgrade.logged_query(env.cr, """ + UPDATE account_account_tag + SET active = FALSE + WHERE + name NOT LIKE '+%' AND + name NOT LIKE '-%' AND + applicability = 'taxes' + """) + + +# Based on file l10n_be/data/account_tax_template_data.xml +# Also based on Mis Builder VAT report +# (Cadre I, II et III -> base, Cardre IV and following -> tax). +base_tag_xmlids = [ + "tax_tag_00", + "tax_tag_01", + "tax_tag_02", + "tax_tag_03", + "tax_tag_44", + "tax_tag_45", + "tax_tag_46L", + "tax_tag_46T", + "tax_tag_47", + "tax_tag_48s44", + "tax_tag_48s46L", + "tax_tag_48s46T", + "tax_tag_49", + "tax_tag_81", + "tax_tag_82", # Also in tax (see line 1816), consider it as base + "tax_tag_83", + "tax_tag_84", + "tax_tag_85", # Also in tax (see line 1839), consider it as base + "tax_tag_86", + "tax_tag_87", + "tax_tag_88", +] +tax_tag_xmlids = [ + "tax_tag_54", + "tax_tag_55", + "tax_tag_56", + "tax_tag_57", + "tax_tag_59", + "tax_tag_61", + "tax_tag_62", + "tax_tag_63", + "tax_tag_64", +] + +# Missing (I don't know what to do with these tags) +# tax_tag_81_not_deductible +# tax_tag_82_not_deductible +# tax_tag_83_not_deductible +# tax_tag_85_not_deductible + + +@openupgrade.migrate() +def migrate(env, version): + remove_wrong_tag(env) + update_account_tax(env) + unlink_tags_from_move_line(env, base_tag_xmlids + tax_tag_xmlids) + disable_troublesome_tags(env) From f0a541bd84daa2015ebbe171edbff6547160f3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 28 Mar 2024 14:45:44 +0100 Subject: [PATCH 02/16] [OU-IMP] l10n_be: migration account.account.tag --- .../migrations/13.0.2.0/post-migration.py | 1200 +++++------------ 1 file changed, 315 insertions(+), 885 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index d8d928cb1495..8ce83f64e747 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -3,880 +3,351 @@ _logger = logging.getLogger(__name__) -ACCOUNT_TAX_NAMES = [ - # In version 9.0 - { - "attn_VAT-OUT-21-S": "21% Services", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% Services", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% Services", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% Services", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocontractant", - "attn_VAT-OUT-00-EU-S": "0% EU Services", - "attn_VAT-OUT-00-EU-L": "0% EU L", - "attn_VAT-OUT-00-EU-T": "0% EU T", - "attn_VAT-OUT-00-ROW": "0% Export Non EU", - "attn_VAT-IN-V81-21": "21% Marchandises", - "attn_VAT-IN-V81-12": "12% Marchandises", - "attn_VAT-IN-V81-06": "6% Marchandises", - "attn_VAT-IN-V81-00": "0% Marchandises", - "attn_VAT-IN-V82-21-S": "21% Services", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% Services", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% Services", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% Services", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", - "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", - "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", - "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", - "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", - "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", - "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", - "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", - "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", - "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", - "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", - "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", - "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", - "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", - "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", - "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", - "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", - "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", - "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", - "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", - "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", - "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", - "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", - "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", - "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", - "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", - "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", - "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", - "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", - "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", - "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", - "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", - "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", - "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", - "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", - "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", - "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", - "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", - "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", - "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", - "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", - "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", - "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", - "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", - "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", - "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", - "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", - "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", - "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", - "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", - "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", - "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", - "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", - "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", - "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", - "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", - "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", - "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", - "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", - "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", - "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", - "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", - "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", - "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", - "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", - "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", - "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", - "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", - "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", - "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", - "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", - }, - - # In version 10.0 - { - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", - "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", - "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", - "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", - "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", - "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", - "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", - "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", - "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", - "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", - "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", - "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", - "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", - "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", - "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", - "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", - "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", - "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", - "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", - "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", - "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", - "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", - "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", - "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", - "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", - "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", - "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", - "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", - "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", - "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", - "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", - "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", - "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", - "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", - "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", - "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", - "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", - "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", - "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", - "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", - "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", - "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", - "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", - "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", - "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", - "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", - "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", - "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", - "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", - "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", - "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", - "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", - "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", - "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", - "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", - "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", - "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", - "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", - "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", - "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", - "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", - "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", - "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", - "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", - "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", - "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", - "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", - "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", - "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", - "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", - "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", - }, - - # In version 11.0 - { - "attn_VAT-OUT-21-S": "21% S.", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% S.", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% S.", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% S.", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocont.", - "attn_VAT-OUT-00-EU-S": "0% EU S.", - "attn_VAT-OUT-00-EU-L": "0% EU M.", - "attn_VAT-OUT-00-EU-T": "0% EU T.", - "attn_VAT-OUT-00-ROW": "0% Non EU", - "attn_VAT-IN-V81-21": "21% M.", - "attn_VAT-IN-V81-12": "12% M.", - "attn_VAT-IN-V81-06": "6% M.", - "attn_VAT-IN-V81-00": "0% M.", - "attn_TVA-21-inclus-dans-prix": "21% S. TTC", - "attn_VAT-IN-V82-21-S": "21% S.", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% S.", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% S.", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% S.", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", - "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", - "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", - "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", - "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", - "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", - "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", - "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", - "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", - "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", - "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", - "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", - "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", - "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", - "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", - "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", - "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", - "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", - "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", - "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", - "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", - "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", - "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", - "attn_VAT-IN-V81-21-EU": "21% EU M.", - "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", - "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", - "attn_VAT-IN-V81-12-EU": "12% EU M.", - "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", - "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", - "attn_VAT-IN-V81-06-EU": "6% EU M.", - "attn_VAT-IN-V81-00-EU": "0% EU M.", - "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", - "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", - "attn_VAT-IN-V82-21-EU-S": "21% EU S.", - "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", - "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", - "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", - "attn_VAT-IN-V82-12-EU-S": "12% EU S.", - "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", - "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", - "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", - "attn_VAT-IN-V82-06-EU-S": "6% EU S.", - "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", - "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "0% EU S.", - "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", - "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", - "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", - "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", - "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", - "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", - "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", - "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", - "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", - "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", - "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", - "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", - "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", - "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", - "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", - "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", - "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", - "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", - "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", - "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", - "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", - }, - - # In version 12.0 - { - "attn_VAT-OUT-21-S": "21% S.", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% S.", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% S.", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% S.", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocont.", - "attn_VAT-OUT-00-EU-S": "0% EU S.", - "attn_VAT-OUT-00-EU-L": "0% EU M.", - "attn_VAT-OUT-00-EU-T": "0% EU T.", - "attn_VAT-OUT-00-ROW": "0% Non EU", - "attn_VAT-IN-V81-21": "21% M.", - "attn_VAT-IN-V81-12": "12% M.", - "attn_VAT-IN-V81-06": "6% M.", - "attn_VAT-IN-V81-00": "0% M.", - "attn_TVA-21-inclus-dans-prix": "21% S. TTC", - "attn_VAT-IN-V82-21-S": "21% S.", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% S.", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% S.", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% S.", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", - "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", - "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", - "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", - "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", - "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", - "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", - "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", - "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", - "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", - "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", - "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", - "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", - "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", - "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", - "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", - "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", - "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", - "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", - "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", - "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", - "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", - "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", - "attn_VAT-IN-V81-21-EU": "21% EU M.", - "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", - "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", - "attn_VAT-IN-V81-12-EU": "12% EU M.", - "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", - "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", - "attn_VAT-IN-V81-06-EU": "6% EU M.", - "attn_VAT-IN-V81-00-EU": "0% EU M.", - "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", - "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", - "attn_VAT-IN-V82-21-EU-S": "21% EU S.", - "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", - "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", - "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", - "attn_VAT-IN-V82-12-EU-S": "12% EU S.", - "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", - "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", - "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", - "attn_VAT-IN-V82-06-EU-S": "6% EU S.", - "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", - "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "0% EU S.", - "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", - "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", - "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", - "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", - "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", - "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", - "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", - "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", - "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", - "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", - "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", - "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", - "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", - "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", - "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", - "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", - "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", - "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", - "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", - "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", - "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", - }, +# Based on file l10n_be/data/account_tax_template_data.xml +# Also based on Mis Builder VAT report +# (Cadre I, II et III -> base, Cardre IV and following -> tax). +base_tag_xmlids = [ + "tax_tag_00", + "tax_tag_01", + "tax_tag_02", + "tax_tag_03", + "tax_tag_44", + "tax_tag_45", + "tax_tag_46L", + "tax_tag_46T", + "tax_tag_47", + "tax_tag_48s44", + "tax_tag_48s46L", + "tax_tag_48s46T", + "tax_tag_49", + "tax_tag_81", + "tax_tag_82", # Also in tax (see line 1816), consider it as base + "tax_tag_83", + "tax_tag_84", + "tax_tag_85", # Also in tax (see line 1839), consider it as base + "tax_tag_86", + "tax_tag_87", + "tax_tag_88", +] +tax_tag_xmlids = [ + "tax_tag_54", + "tax_tag_55", + "tax_tag_56", + "tax_tag_57", + "tax_tag_59", + "tax_tag_61", + "tax_tag_62", + "tax_tag_63", + "tax_tag_64", +] +# See replace_not_deductible_tag function +not_deductible_tag_xmlids = [ + "tax_tag_81_not_deductible", + "tax_tag_82_not_deductible", + "tax_tag_83_not_deductible", + "tax_tag_85_not_deductible", ] +# This is tables of correspondance between old tags and the new tax tags +# based on the tax tag used in the account.tax.template +base_invoice_tag_xmlids = [ + ("tax_tag_00", "+00"), + ("tax_tag_01", "+01"), + ("tax_tag_02", "+02"), + ("tax_tag_03", "+03"), + ("tax_tag_44", "+44"), + ("tax_tag_45", "+45"), + ("tax_tag_46L", "+46L"), + ("tax_tag_46T", "+46T"), + ("tax_tag_47", "+47"), + ("tax_tag_81", "+81"), + ("tax_tag_82", "+82"), + ("tax_tag_83", "+83"), + ("tax_tag_86", "+86"), + ("tax_tag_87", "+87"), + ("tax_tag_88", "+88"), + ("tax_tag_81_not_deductible", "+81"), + ("tax_tag_82_not_deductible", "+82"), + ("tax_tag_83_not_deductible", "+83"), +] -def get_old_account_tax_names(xmlid): - """ - Return a list of old names for the account.tax given matching the - xmlid. - """ - names = [] - for version in ACCOUNT_TAX_NAMES: - name = version.get(xmlid) - if name: - names.append(name) - return names +tax_invoice_tag_xmlids = [ + ("tax_tag_54", "+54"), + ("tax_tag_55", "-55"), + ("tax_tag_56", "-56"), + ("tax_tag_57", "-57"), + ("tax_tag_59", "+59"), + ("tax_tag_82", "+82"), + ("tax_tag_82_not_deductible", "+82"), +] +base_refund_tag_xmlids = [ + ("tax_tag_48s44", "+48s44"), + ("tax_tag_48s46L", "+48s46L"), + ("tax_tag_48s46T", "+48s46T"), + ("tax_tag_49", "+49"), + ("tax_tag_81", "-81"), + ("tax_tag_82", "-82"), + ("tax_tag_83", "-83"), + ("tax_tag_84", "+84"), + ("tax_tag_85", "+85"), + ("tax_tag_86", "-86"), + ("tax_tag_87", "-87"), + ("tax_tag_88", "-88"), + ("tax_tag_81_not_deductible", "-81"), + ("tax_tag_82_not_deductible", "-82"), + ("tax_tag_83_not_deductible", "-83"), + ("tax_tag_85_not_deductible", "+85"), +] -def get_tags(env, repartition_line_tmpl): - """ - Return the tags linked to an account.tax.repartition.line.template - """ - tag_names = [] - for report_line in repartition_line_tmpl.plus_report_line_ids: - tag_names.append("+" + report_line.tag_name) - for report_line in repartition_line_tmpl.minus_report_line_ids: - tag_names.append("-" + report_line.tag_name) - return env["account.account.tag"].search([("name", "in", tag_names)]) +tax_refund_tag_xmlids = [ + ("tax_tag_63", "+63"), + ("tax_tag_64", "+64"), + ("tax_tag_82", "-82"), + ("tax_tag_82_not_deductible", "-82"), +] +tax_unclassified_tag_xmlids = [ + "tax_tag_61", + "tax_tag_62", +] -def is_account_tax_used(env, account_tax): - """Return True if account_tax is used on an account.move.line.""" - env.cr.execute( - """ - SELECT account_tax_id - FROM account_move_line_account_tax_rel - WHERE account_tax_id = %s - """, - (account_tax.id,), - ) - return len(env.cr.fetchall()) > 0 +def get_account_tax_templates_iterator(env): + """ + Return account.tax.template with their xmlid + """ + module = "l10n_be" + data = env['ir.model.data'].search([ + ('model', '=', 'account.tax.template'), + ('module', 'like', module) + ]) + for elem in data: + account_tax_template = env["account.tax.template"].browse(elem.res_id) + yield elem.name, account_tax_template -def find_account_tax(env, xmlid, account_tax_template, company_id): - """Return the account tax based on the given account.tax.template""" - current_name = account_tax_template.name - old_names = get_old_account_tax_names(xmlid) - domain = [ - ("type_tax_use", "=", account_tax_template.type_tax_use), - ("company_id", "=", company_id.id), - ] - if not old_names: - _logger.info( - "Skipping account.tax.template '%s', because it's a new one.", - current_name, - ) - return env["account.tax"] +# FIXME: maybe this is not useful anymore. +def get_custom_account_tax_with_tags(env): + """Get custom account.tax based on the fact that their name does not + exist in account.tax.template. + """ + account_tax_template_ids = env["account.tax.template"] + for _xmlid, account_tax_template in get_account_tax_templates_iterator(env): + account_tax_template_ids |= account_tax_template - _logger.info( - "Looking for a account.tax that match account.tax.template '%s'.", - current_name - ) - account_taxes = env["account.tax"].search( - domain + [("name", "=", current_name)] + account_tax_ids = env["account.tax"].search( + [("name", "not in", account_tax_template_ids.mapped("name"))], ) + custom_account_tax_ids = env["account.tax"] + for account_tax_id in account_tax_ids: + for repartition in ( + account_tax_id.invoice_repartition_line_ids + + account_tax_id.refund_repartition_line_ids + ): + if repartition.tag_ids: + custom_account_tax_ids |= account_tax_id + continue + return custom_account_tax_ids - if not account_taxes: - _logger.info( - "No account.tax named '%s', searching with older names.", - current_name - ) - account_taxes = env["account.tax"].search( - domain + [("name", "in", old_names)] - ) - - nb_account_taxes = len(account_taxes) - account_taxes_used = account_taxes.filtered( - lambda r: is_account_tax_used(env, r) - ) - if nb_account_taxes > 1: - _logger.info( - "There is several account.tax found for the " - "account.tax.template '%s'. Trying to see which one is " - "realy used.", - current_name, - ) +def update_custom_account_tax(env): + """This function tries to update custom account.tax that does not + match a account.tax.template. - nb_account_taxes_used = len(account_taxes_used) - if nb_account_taxes_used > 1: - raise ValueError( - "There is several account.tax found for the " - "account.tax.template ID %s '%s' that are used on " - "account.move.line. Clean up " - "account.tax by renaming your specific account.tax " - "and migrate it via a dedicated script. " - "The matching account.tax ID %s" - % ( - account_tax_template.id, - current_name, - ", ".join(str(rec_id) for rec_id in account_taxes_used.ids) - ) + This function should be run after update_account_tax which will + adapt existing taxes based on account.tax.template, and rename it + accordingly. + """ + # get old tags and extract their code names + correspondance = { + ("invoice", "base"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in base_invoice_tag_xmlids + ], + ("invoice", "tax"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in tax_invoice_tag_xmlids + ], + ("refund", "base"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in base_refund_tag_xmlids + ], + ("refund", "tax"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in tax_refund_tag_xmlids + ], + } + + def get_new_tag_names(tag_ids, old_tags): + """Return list of code and old_tags for tag_ids that exists in + old_tags + """ + keep_tags = [] + for tag in tag_ids: + for old_tag, new_name in old_tags: + if tag == old_tag: + keep_tags.append(new_name) + return keep_tags + + def repartition_lines_iter(account_tax): + """Special loop over repartition lines in an account.tax""" + for repartition in account_tax.invoice_repartition_line_ids: + yield ("invoice", repartition) + for repartition in account_tax.refund_repartition_line_ids: + yield ("refund", repartition) + + #custom_account_tax_ids = get_custom_account_tax_with_tags(env) + custom_account_tax_ids = ( + env["account.tax"] + .with_context(active_test=False) + .search([]) + ) + for account_tax in custom_account_tax_ids: + for reptype, repartition in repartition_lines_iter(account_tax): + key = (reptype, repartition.repartition_type) + # keep right tags + keep_tags = get_new_tag_names( + repartition.tag_ids, correspondance[key] ) - - account_tax = account_taxes_used - - else: - account_tax = account_taxes - - if not account_tax: - _logger.error( - "No matching account.tax for the account.tax.template '%s'.", - current_name, - ) - else: - _logger.info( - "Using account.tax ID %s '%s' that correspond to the " - "account.tax.template '%s'.", - account_tax.id, - account_tax.name, - current_name, - ) - - return account_tax + # fix special tags + if ( + repartition.repartition_type == "tax" + and len(keep_tags) > 1 + ): + if "+82" in keep_tags: + keep_tags.remove("+82") + if "-82" in keep_tags: + keep_tags.remove("-82") + # convert tags + new_tags = env["account.account.tag"] + for new_name in keep_tags: + new_tag = env["account.account.tag"].search( + [("name", "=", new_name)], limit=1, + ) + new_tags |= new_tag + repartition.tag_ids = new_tags -def find_repartition_line(account_tax, repartition_line_tmpl): - """ - Retrieve the repartition line that match the given repartition - line from the account.tax.template +def update_tags_on_move_line(env): + """Based on new account.tax, this function check that + account.account.tag on account.move.line are correct. """ - # Choose to search on invoice repartition lines or refund ones. - if repartition_line_tmpl.invoice_tax_id: - repartition_lines = account_tax.invoice_repartition_line_ids - else: - repartition_lines = account_tax.refund_repartition_line_ids - - repartition_lines = repartition_lines.filtered( - lambda r: r.repartition_type == repartition_line_tmpl.repartition_type + account_move_line_ids = ( + env["account.move.line"] + .with_context(active_test=False) + .search([]) ) + for move_line_id in account_move_line_ids: + move_id = move_line_id.move_id + repartition_id = move_line_id.tax_repartition_line_id + tax_line_id = move_line_id.tax_line_id + tax_ids = move_line_id.tax_ids + tax_base_amount = move_line_id.tax_base_amount + + # If a repartition line exists then apply tags form this + # repartition line + if repartition_id: + new_tag_ids = repartition_id.tag_ids + + # If tax_lin_id exists, then find the right repartition line and + # apply tags from this repartition line + elif tax_line_id: + repartition_line_ids = env["account.tax.repartition.line"] + if "invoice" in move_id.type: + repartition_line_ids = tax_line_id.invoice_repartition_line_ids + elif "refund" in move_id.type: + repartition_line_ids = tax_line_id.refund_repartition_line_ids + tax_repartition_ids = repartition_line_ids.filtered( + lambda r: r.repartition_type == "tax" + ) + tax_repartition_id = env["account.tax.repartition.line"] + if len(tax_repartition_ids) > 1: + for rep in tax_repartition_ids: + if move_line_id.account_id == rep.account_id: + tax_repartition_id = rep + elif tax_repartition_ids: + tax_repartition_id = tax_repartition_ids + if not repartition_id: + raise ValueError() + new_tag_ids = tax_repartition_id.tag_ids + + # If tax_ids exists and the tax_base_amount is 0 or null + # then it's a base line, so apply base repartition line from + # taxes. + elif tax_ids and not tax_base_amount: + repartition_line_ids = env["account.tax.repartition.line"] + if "invoice" in move_id.type: + repartition_line_ids = tax_ids.mapped( + "invoice_repartition_line_ids" + ) + elif "refund" in move_id.type: + repartition_line_ids = tax_ids.mapped( + "refund_repartition_line_ids" + ) + base_repartition_ids = repartition_line_ids.filtered( + lambda r: r.repartition_type == "base" + ) + new_tag_ids = base_repartition_ids.mapped("tag_ids") - if len(repartition_lines) > 1: - repartition_lines = repartition_lines.filtered( - lambda r: r.factor_percent == repartition_line_tmpl.factor_percent - ) - - if len(repartition_lines) > 1: - repartition_lines = repartition_lines.filtered( - lambda r: r.account_id == repartition_line_tmpl.account_id - ) + else: + new_tag_ids = env["account.account.tag"] - if not repartition_lines: - # TODO: maybe in this case we need to create the repartition.line ? - # Or we should delegate this to account_chart_update ? - _logger.error( - "No matching account.tax.repartition.line on account.tax ID %s " - "for the account.tax.repartition.line.template ID %s", - account_tax.id, - repartition_line_tmpl.id, - ) - elif len(repartition_lines) > 1: - _logger.error( - "Several matching account.tax.repartition.line on account.tax " - "ID %s for the account.tax.repartition.line.template ID %s." - "Found account.tax.repartition.line ID %s.", - account_tax.id, - repartition_line_tmpl.id, - ", ".join(str(rec_id) for rec_id in repartition_lines.ids), - ) - else: - _logger.info( - "Found matching account.tax.repartition.line ID %s " - "on account.tax ID %s " - "for the account.tax.repartition.line.template ID %s", - repartition_lines.id, - account_tax.id, - repartition_line_tmpl.id, - ) + move_line_id.tag_ids = new_tag_ids - return repartition_lines +def replace_not_deductible_tag(env): + """The not deductible tags does not exists in 16.0 anymore: + - l10n_be.tax_tag_81_not_deductible + - l10n_be.tax_tag_82_not_deductible + - l10n_be.tax_tag_83_not_deductible + - l10n_be.tax_tag_85_not_deductible + In default configuration in 16.0 (see Car tax), the default +8x and + -8x are used instead of the 8x_not_deductible version. -def update_repartition_line(env, repartition_line, repartition_line_tmpl): - """ - Update tag of the account.tax.repartition.line based on - account.tax.repartition.line.template + As a last resort, this function replace these tags by their standard + version. This is not correct, but covers all specific cases with + theses tags. - Update the following tables: - - account_account_tag_account_tax_repartition_line_rel - - account_account_tag_account_move_line_rel + Custom taxes should be managed by a custom script. """ - # FIXME: I'm not sure if the table : - # - account_tax_repartition_financial_tags - # should be updated or not. - - new_tag_ids = get_tags(env, repartition_line_tmpl) - old_tag_ids = repartition_line.tag_ids - - # Update account_account_tag_account_tax_repartition_line_rel - openupgrade.logged_query( - env.cr, - """ - DELETE FROM account_account_tag_account_tax_repartition_line_rel - WHERE account_tax_repartition_line_id = %s; - """, - (repartition_line.id,) - ) - for new_tag_id in new_tag_ids: + tags_correspondance = [ + ( + env.ref("l10n_be.tax_tag_81_not_deductible"), + env["account.account.tag"].search([("name", "=", "+81")], limit=1), + ), + ( + env.ref("l10n_be.tax_tag_82_not_deductible"), + env["account.account.tag"].search([("name", "=", "+82")], limit=1), + ), + ( + env.ref("l10n_be.tax_tag_83_not_deductible"), + env["account.account.tag"].search([("name", "=", "+83")], limit=1), + ), + ( + env.ref("l10n_be.tax_tag_85_not_deductible"), + env["account.account.tag"].search([("name", "=", "+85")], limit=1), + ), + ] + for old_tag, new_tag in tags_correspondance: openupgrade.logged_query( env.cr, """ - INSERT INTO account_account_tag_account_tax_repartition_line_rel - (account_tax_repartition_line_id, account_account_tag_id) - VALUES (%s, %s) + UPDATE account_account_tag_account_tax_repartition_line_rel + SET account_account_tag_id = %s + WHERE account_account_tag_id = %s """, - (repartition_line.id, new_tag_id.id), - ) - - # Update account_account_tag_account_move_line_rel - domain = [ - "|", - ("tax_ids", "=", repartition_line.tax_id.id), - ("tax_line_id", "=", repartition_line.tax_id.id), - ("tax_repartition_line_id", "=", False), - ] - if repartition_line.repartition_type == "base": - # WARNING: Here I'm not sure if an account.move.line with a null - # value as tax_base_amount should be considered equal to zero or - # not. For now, I assume yes. - domain.append("|") - domain.append(("tax_base_amount", "=", 0)) - domain.append(("tax_base_amount", "=", False)) - if repartition_line.repartition_type == "tax": - domain.append(("tax_base_amount", "!=", 0)) - - account_move_line_ids = env["account.move.line"].search(domain) - - # Considering that "out_receipt" and "in_receipt" are not affected - # by tags. - if repartition_line.invoice_tax_id: - account_move_line_ids = account_move_line_ids.filtered( - lambda r: r.move_id.type in ("out_invoice", "in_invoice") - ) - if repartition_line.refund_tax_id: - # WARNING ! Some refund are invoices with a negative amount - # This case is not taken into account. - account_move_line_ids = account_move_line_ids.filtered( - lambda r: r.move_id.type in ("out_refund", "in_refund") + (new_tag.id, old_tag.id), ) - - # Adding account.move.line that are linked to this specific - # repartition_line - account_move_line_ids += env["account.move.line"].search( - [("tax_repartition_line_id", "=", repartition_line.id)] - ) - - if not account_move_line_ids or not old_tag_ids: - return - - openupgrade.logged_query( - env.cr, - """ - DELETE FROM account_account_tag_account_move_line_rel - WHERE account_move_line_id IN (%s) - AND account_account_tag_id IN (%s) - """ % ( - ",".join(str(rec_id) for rec_id in account_move_line_ids.ids), - ",".join(str(rec_id) for rec_id in old_tag_ids.ids), - ), - ) - for new_tag_id in new_tag_ids: - values = [ - "(%s, %s)" % (aml_id, new_tag_id.id) - for aml_id in account_move_line_ids.ids - ] openupgrade.logged_query( env.cr, """ - INSERT INTO account_account_tag_account_move_line_rel - (account_move_line_id, account_account_tag_id) - VALUES %s - ON CONFLICT DO NOTHING - """ % ",".join(values), - ) - - -def get_account_tax_templates_iterator(env): - """ - Return account.tax.template with their xmlid - """ - module = "l10n_be" - data = env['ir.model.data'].search([ - ('model', '=', 'account.tax.template'), - ('module', 'like', module) - ]) - for elem in data: - account_tax_template = env["account.tax.template"].browse(elem.res_id) - yield elem.name, account_tax_template - - -def apply_new_tax_tags_on_account_tax(env, account_tax, account_tax_template): - """ - The normal migration script of module account tries to link the old - account.account.tag to account.tax.repartition.line. - Which does not reflect the new account.tax.template and new - account.account.tag which comes with positive (debit) and negative - (credit) flavors. - This function replace the old tags by the new ones. - """ - for repartition_line_tmpl in ( - account_tax_template.invoice_repartition_line_ids - + account_tax_template.refund_repartition_line_ids - ): - repartition_line = find_repartition_line( - account_tax, repartition_line_tmpl + UPDATE account_account_tag_account_move_line_rel + SET account_account_tag_id = %s + WHERE account_account_tag_id = %s + """, + (new_tag.id, old_tag.id), ) - if not repartition_line: - _logger.info( - "No account.tax.repartition.line found that match " - "the repartition line ID %s of the account.tax.template " - "ID %s '%s'", - repartition_line_tmpl.id, - account_tax_template.id, - account_tax_template.name, - ) - continue - update_repartition_line(env, repartition_line, repartition_line_tmpl) - - -def update_account_tax(env): - """ - Use account.tax.template to update existing account.tax - """ - for company in env["res.company"].search([]): - for xmlid, account_tax_template in get_account_tax_templates_iterator(env): - account_tax = find_account_tax(env, xmlid, account_tax_template, company) - - if not account_tax: - continue - - apply_new_tax_tags_on_account_tax( - env, account_tax, account_tax_template - ) - - # Rename account_tax - account_tax.name = account_tax_template.name def remove_wrong_tag(env): @@ -929,54 +400,13 @@ def disable_troublesome_tags(env): """) -# Based on file l10n_be/data/account_tax_template_data.xml -# Also based on Mis Builder VAT report -# (Cadre I, II et III -> base, Cardre IV and following -> tax). -base_tag_xmlids = [ - "tax_tag_00", - "tax_tag_01", - "tax_tag_02", - "tax_tag_03", - "tax_tag_44", - "tax_tag_45", - "tax_tag_46L", - "tax_tag_46T", - "tax_tag_47", - "tax_tag_48s44", - "tax_tag_48s46L", - "tax_tag_48s46T", - "tax_tag_49", - "tax_tag_81", - "tax_tag_82", # Also in tax (see line 1816), consider it as base - "tax_tag_83", - "tax_tag_84", - "tax_tag_85", # Also in tax (see line 1839), consider it as base - "tax_tag_86", - "tax_tag_87", - "tax_tag_88", -] -tax_tag_xmlids = [ - "tax_tag_54", - "tax_tag_55", - "tax_tag_56", - "tax_tag_57", - "tax_tag_59", - "tax_tag_61", - "tax_tag_62", - "tax_tag_63", - "tax_tag_64", -] - -# Missing (I don't know what to do with these tags) -# tax_tag_81_not_deductible -# tax_tag_82_not_deductible -# tax_tag_83_not_deductible -# tax_tag_85_not_deductible - - @openupgrade.migrate() def migrate(env, version): remove_wrong_tag(env) - update_account_tax(env) - unlink_tags_from_move_line(env, base_tag_xmlids + tax_tag_xmlids) + update_custom_account_tax(env) + update_tags_on_move_line(env) + #replace_not_deductible_tag(env) + unlink_tags_from_move_line( + env, base_tag_xmlids + tax_tag_xmlids + not_deductible_tag_xmlids + ) disable_troublesome_tags(env) From 868ce62fffcda18a36306f5df4703bd76e484611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 28 Mar 2024 15:19:42 +0100 Subject: [PATCH 03/16] [OU-IMP] l10n_be: remove unused functions --- .../migrations/13.0.2.0/post-migration.py | 94 ------------------- 1 file changed, 94 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index 8ce83f64e747..eeaccec59ca2 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -113,44 +113,6 @@ ] -def get_account_tax_templates_iterator(env): - """ - Return account.tax.template with their xmlid - """ - module = "l10n_be" - data = env['ir.model.data'].search([ - ('model', '=', 'account.tax.template'), - ('module', 'like', module) - ]) - for elem in data: - account_tax_template = env["account.tax.template"].browse(elem.res_id) - yield elem.name, account_tax_template - - -# FIXME: maybe this is not useful anymore. -def get_custom_account_tax_with_tags(env): - """Get custom account.tax based on the fact that their name does not - exist in account.tax.template. - """ - account_tax_template_ids = env["account.tax.template"] - for _xmlid, account_tax_template in get_account_tax_templates_iterator(env): - account_tax_template_ids |= account_tax_template - - account_tax_ids = env["account.tax"].search( - [("name", "not in", account_tax_template_ids.mapped("name"))], - ) - custom_account_tax_ids = env["account.tax"] - for account_tax_id in account_tax_ids: - for repartition in ( - account_tax_id.invoice_repartition_line_ids - + account_tax_id.refund_repartition_line_ids - ): - if repartition.tag_ids: - custom_account_tax_ids |= account_tax_id - continue - return custom_account_tax_ids - - def update_custom_account_tax(env): """This function tries to update custom account.tax that does not match a account.tax.template. @@ -197,7 +159,6 @@ def repartition_lines_iter(account_tax): for repartition in account_tax.refund_repartition_line_ids: yield ("refund", repartition) - #custom_account_tax_ids = get_custom_account_tax_with_tags(env) custom_account_tax_ids = ( env["account.tax"] .with_context(active_test=False) @@ -296,60 +257,6 @@ def update_tags_on_move_line(env): move_line_id.tag_ids = new_tag_ids -def replace_not_deductible_tag(env): - """The not deductible tags does not exists in 16.0 anymore: - - l10n_be.tax_tag_81_not_deductible - - l10n_be.tax_tag_82_not_deductible - - l10n_be.tax_tag_83_not_deductible - - l10n_be.tax_tag_85_not_deductible - In default configuration in 16.0 (see Car tax), the default +8x and - -8x are used instead of the 8x_not_deductible version. - - As a last resort, this function replace these tags by their standard - version. This is not correct, but covers all specific cases with - theses tags. - - Custom taxes should be managed by a custom script. - """ - tags_correspondance = [ - ( - env.ref("l10n_be.tax_tag_81_not_deductible"), - env["account.account.tag"].search([("name", "=", "+81")], limit=1), - ), - ( - env.ref("l10n_be.tax_tag_82_not_deductible"), - env["account.account.tag"].search([("name", "=", "+82")], limit=1), - ), - ( - env.ref("l10n_be.tax_tag_83_not_deductible"), - env["account.account.tag"].search([("name", "=", "+83")], limit=1), - ), - ( - env.ref("l10n_be.tax_tag_85_not_deductible"), - env["account.account.tag"].search([("name", "=", "+85")], limit=1), - ), - ] - for old_tag, new_tag in tags_correspondance: - openupgrade.logged_query( - env.cr, - """ - UPDATE account_account_tag_account_tax_repartition_line_rel - SET account_account_tag_id = %s - WHERE account_account_tag_id = %s - """, - (new_tag.id, old_tag.id), - ) - openupgrade.logged_query( - env.cr, - """ - UPDATE account_account_tag_account_move_line_rel - SET account_account_tag_id = %s - WHERE account_account_tag_id = %s - """, - (new_tag.id, old_tag.id), - ) - - def remove_wrong_tag(env): """ Remove tags on account.move.line that are not linked to an @@ -405,7 +312,6 @@ def migrate(env, version): remove_wrong_tag(env) update_custom_account_tax(env) update_tags_on_move_line(env) - #replace_not_deductible_tag(env) unlink_tags_from_move_line( env, base_tag_xmlids + tax_tag_xmlids + not_deductible_tag_xmlids ) From 0fcfd759c1f430a46492fda15b939cd6672d3299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 28 Mar 2024 15:29:15 +0100 Subject: [PATCH 04/16] [OU-IMP] l10n_be: change parts from python to sql --- .../migrations/13.0.2.0/post-migration.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index eeaccec59ca2..b232e0713726 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -254,7 +254,27 @@ def update_tags_on_move_line(env): else: new_tag_ids = env["account.account.tag"] - move_line_id.tag_ids = new_tag_ids + # Write new tags + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_move_line_rel + WHERE account_move_line_id = %s + """, + (move_line_id.id,), + ) + for new_tag_id in new_tag_ids: + openupgrade.logged_query( + env.cr, + """ + INSERT INTO account_account_tag_account_move_line_rel ( + account_move_line_id, + account_account_tag_id + ) + VALUES (%s, %s) + """, + (move_line_id.id, new_tag_id.id), + ) def remove_wrong_tag(env): From c0a43e06a0d9d1ead8a6c8d0f806ed9400da69f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 28 Mar 2024 16:34:30 +0100 Subject: [PATCH 05/16] [OU-IMP] l10n_be: log error instead of raising error --- addons/l10n_be/migrations/13.0.2.0/post-migration.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index b232e0713726..f723e27de25d 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -230,7 +230,11 @@ def update_tags_on_move_line(env): elif tax_repartition_ids: tax_repartition_id = tax_repartition_ids if not repartition_id: - raise ValueError() + _logger.error( + "No account.tax.repartition.line found for " + "account.move.line(%s)." + % move_line_id.id + ) new_tag_ids = tax_repartition_id.tag_ids # If tax_ids exists and the tax_base_amount is 0 or null From 28566d833bf9366e6e431424bc5b417bd6de7474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 28 Mar 2024 23:44:19 +0100 Subject: [PATCH 06/16] [OU-IMP] l10n_be: fix for VAT-IN-V81-21-EU-CX --- .../migrations/13.0.2.0/post-migration.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index f723e27de25d..ef58a487ae0b 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -180,6 +180,29 @@ def repartition_lines_iter(account_tax): keep_tags.remove("+82") if "-82" in keep_tags: keep_tags.remove("-82") + # fix special tax + if account_tax.name == "VAT-IN-V81-21-EU-C1": + if reptype == "invoice": + if repartition.repartition_type == "base": + keep_tags = ["+81", "+86"] + elif repartition.repartition_type == "tax": + keep_tags = ["+59"] + elif reptype == "refund": + if repartition.repartition_type == "base": + keep_tags = ["-81", "-86", "+84"] + elif repartition.repartition_type == "tax": + keep_tags = [] + if account_tax.name == "VAT-IN-V81-21-EU-C2": + if reptype == "invoice": + if repartition.repartition_type == "base": + keep_tags = ["+81", "+86"] + elif repartition.repartition_type == "tax": + keep_tags = ["-55"] + elif reptype == "refund": + if repartition.repartition_type == "base": + keep_tags = ["-81", "-86", "+84"] + elif repartition.repartition_type == "tax": + keep_tags = [] # convert tags new_tags = env["account.account.tag"] for new_name in keep_tags: From 4b7eaa41e3c81ed800b5e8ea9f98ad451c7f8755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Fri, 29 Mar 2024 13:17:06 +0100 Subject: [PATCH 07/16] [OU-IMP] l10n_be: update taxes based on tax.template Split files into several for readability. --- .../migrations/13.0.2.0/custom_taxes.py | 146 ++++ .../migrations/13.0.2.0/post-migration.py | 172 +--- .../migrations/13.0.2.0/tax_template.py | 811 ++++++++++++++++++ 3 files changed, 963 insertions(+), 166 deletions(-) create mode 100644 addons/l10n_be/migrations/13.0.2.0/custom_taxes.py create mode 100644 addons/l10n_be/migrations/13.0.2.0/tax_template.py diff --git a/addons/l10n_be/migrations/13.0.2.0/custom_taxes.py b/addons/l10n_be/migrations/13.0.2.0/custom_taxes.py new file mode 100644 index 000000000000..27a999685726 --- /dev/null +++ b/addons/l10n_be/migrations/13.0.2.0/custom_taxes.py @@ -0,0 +1,146 @@ +from openupgradelib import openupgrade +import logging + +_logger = logging.getLogger(__name__) + + +# This is tables of correspondance between old tags and the new tax tags +# based on the tax tag used in the account.tax.template +base_invoice_tag_xmlids = [ + ("tax_tag_00", "+00"), + ("tax_tag_01", "+01"), + ("tax_tag_02", "+02"), + ("tax_tag_03", "+03"), + ("tax_tag_44", "+44"), + ("tax_tag_45", "+45"), + ("tax_tag_46L", "+46L"), + ("tax_tag_46T", "+46T"), + ("tax_tag_47", "+47"), + ("tax_tag_81", "+81"), + ("tax_tag_82", "+82"), + ("tax_tag_83", "+83"), + ("tax_tag_86", "+86"), + ("tax_tag_87", "+87"), + ("tax_tag_88", "+88"), + ("tax_tag_81_not_deductible", "+81"), + ("tax_tag_82_not_deductible", "+82"), + ("tax_tag_83_not_deductible", "+83"), +] + +tax_invoice_tag_xmlids = [ + ("tax_tag_54", "+54"), + ("tax_tag_55", "-55"), + ("tax_tag_56", "-56"), + ("tax_tag_57", "-57"), + ("tax_tag_59", "+59"), + ("tax_tag_82", "+82"), + ("tax_tag_82_not_deductible", "+82"), +] + +base_refund_tag_xmlids = [ + ("tax_tag_48s44", "+48s44"), + ("tax_tag_48s46L", "+48s46L"), + ("tax_tag_48s46T", "+48s46T"), + ("tax_tag_49", "+49"), + ("tax_tag_81", "-81"), + ("tax_tag_82", "-82"), + ("tax_tag_83", "-83"), + ("tax_tag_84", "+84"), + ("tax_tag_85", "+85"), + ("tax_tag_86", "-86"), + ("tax_tag_87", "-87"), + ("tax_tag_88", "-88"), + ("tax_tag_81_not_deductible", "-81"), + ("tax_tag_82_not_deductible", "-82"), + ("tax_tag_83_not_deductible", "-83"), + ("tax_tag_85_not_deductible", "+85"), +] + +tax_refund_tag_xmlids = [ + ("tax_tag_63", "+63"), + ("tax_tag_64", "+64"), + ("tax_tag_82", "-82"), + ("tax_tag_82_not_deductible", "-82"), +] + +tax_unclassified_tag_xmlids = [ + "tax_tag_61", + "tax_tag_62", +] + + +def update_custom_account_tax(env): + """This function tries to update custom account.tax that does not + match a account.tax.template. + + This function should be run after update_account_tax which will + adapt existing taxes based on account.tax.template, and rename it + accordingly. + """ + # get old tags and extract their code names + correspondance = { + ("invoice", "base"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in base_invoice_tag_xmlids + ], + ("invoice", "tax"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in tax_invoice_tag_xmlids + ], + ("refund", "base"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in base_refund_tag_xmlids + ], + ("refund", "tax"): [ + (env.ref("l10n_be." + xmlid), new_name) + for xmlid, new_name in tax_refund_tag_xmlids + ], + } + + def get_new_tag_names(tag_ids, old_tags): + """Return list of code and old_tags for tag_ids that exists in + old_tags + """ + keep_tags = [] + for tag in tag_ids: + for old_tag, new_name in old_tags: + if tag == old_tag: + keep_tags.append(new_name) + return keep_tags + + def repartition_lines_iter(account_tax): + """Special loop over repartition lines in an account.tax""" + for repartition in account_tax.invoice_repartition_line_ids: + yield ("invoice", repartition) + for repartition in account_tax.refund_repartition_line_ids: + yield ("refund", repartition) + + custom_account_tax_ids = ( + env["account.tax"] + .with_context(active_test=False) + .search([]) + ) + for account_tax in custom_account_tax_ids: + for reptype, repartition in repartition_lines_iter(account_tax): + key = (reptype, repartition.repartition_type) + # keep right tags + keep_tags = get_new_tag_names( + repartition.tag_ids, correspondance[key] + ) + # fix special cases + if ( + repartition.repartition_type == "tax" + and len(keep_tags) > 1 + ): + if "+82" in keep_tags: + keep_tags.remove("+82") + if "-82" in keep_tags: + keep_tags.remove("-82") + # convert tags + new_tags = env["account.account.tag"] + for new_name in keep_tags: + new_tag = env["account.account.tag"].search( + [("name", "=", new_name)], limit=1, + ) + new_tags |= new_tag + repartition.tag_ids = new_tags diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-migration.py index ef58a487ae0b..90b6985dce85 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-migration.py @@ -1,6 +1,9 @@ from openupgradelib import openupgrade import logging +from tax_template import update_account_tax_based_on_templates +from custom_taxes import update_custom_account_tax + _logger = logging.getLogger(__name__) # Based on file l10n_be/data/account_tax_template_data.xml @@ -48,170 +51,6 @@ "tax_tag_85_not_deductible", ] -# This is tables of correspondance between old tags and the new tax tags -# based on the tax tag used in the account.tax.template -base_invoice_tag_xmlids = [ - ("tax_tag_00", "+00"), - ("tax_tag_01", "+01"), - ("tax_tag_02", "+02"), - ("tax_tag_03", "+03"), - ("tax_tag_44", "+44"), - ("tax_tag_45", "+45"), - ("tax_tag_46L", "+46L"), - ("tax_tag_46T", "+46T"), - ("tax_tag_47", "+47"), - ("tax_tag_81", "+81"), - ("tax_tag_82", "+82"), - ("tax_tag_83", "+83"), - ("tax_tag_86", "+86"), - ("tax_tag_87", "+87"), - ("tax_tag_88", "+88"), - ("tax_tag_81_not_deductible", "+81"), - ("tax_tag_82_not_deductible", "+82"), - ("tax_tag_83_not_deductible", "+83"), -] - -tax_invoice_tag_xmlids = [ - ("tax_tag_54", "+54"), - ("tax_tag_55", "-55"), - ("tax_tag_56", "-56"), - ("tax_tag_57", "-57"), - ("tax_tag_59", "+59"), - ("tax_tag_82", "+82"), - ("tax_tag_82_not_deductible", "+82"), -] - -base_refund_tag_xmlids = [ - ("tax_tag_48s44", "+48s44"), - ("tax_tag_48s46L", "+48s46L"), - ("tax_tag_48s46T", "+48s46T"), - ("tax_tag_49", "+49"), - ("tax_tag_81", "-81"), - ("tax_tag_82", "-82"), - ("tax_tag_83", "-83"), - ("tax_tag_84", "+84"), - ("tax_tag_85", "+85"), - ("tax_tag_86", "-86"), - ("tax_tag_87", "-87"), - ("tax_tag_88", "-88"), - ("tax_tag_81_not_deductible", "-81"), - ("tax_tag_82_not_deductible", "-82"), - ("tax_tag_83_not_deductible", "-83"), - ("tax_tag_85_not_deductible", "+85"), -] - -tax_refund_tag_xmlids = [ - ("tax_tag_63", "+63"), - ("tax_tag_64", "+64"), - ("tax_tag_82", "-82"), - ("tax_tag_82_not_deductible", "-82"), -] - -tax_unclassified_tag_xmlids = [ - "tax_tag_61", - "tax_tag_62", -] - - -def update_custom_account_tax(env): - """This function tries to update custom account.tax that does not - match a account.tax.template. - - This function should be run after update_account_tax which will - adapt existing taxes based on account.tax.template, and rename it - accordingly. - """ - # get old tags and extract their code names - correspondance = { - ("invoice", "base"): [ - (env.ref("l10n_be." + xmlid), new_name) - for xmlid, new_name in base_invoice_tag_xmlids - ], - ("invoice", "tax"): [ - (env.ref("l10n_be." + xmlid), new_name) - for xmlid, new_name in tax_invoice_tag_xmlids - ], - ("refund", "base"): [ - (env.ref("l10n_be." + xmlid), new_name) - for xmlid, new_name in base_refund_tag_xmlids - ], - ("refund", "tax"): [ - (env.ref("l10n_be." + xmlid), new_name) - for xmlid, new_name in tax_refund_tag_xmlids - ], - } - - def get_new_tag_names(tag_ids, old_tags): - """Return list of code and old_tags for tag_ids that exists in - old_tags - """ - keep_tags = [] - for tag in tag_ids: - for old_tag, new_name in old_tags: - if tag == old_tag: - keep_tags.append(new_name) - return keep_tags - - def repartition_lines_iter(account_tax): - """Special loop over repartition lines in an account.tax""" - for repartition in account_tax.invoice_repartition_line_ids: - yield ("invoice", repartition) - for repartition in account_tax.refund_repartition_line_ids: - yield ("refund", repartition) - - custom_account_tax_ids = ( - env["account.tax"] - .with_context(active_test=False) - .search([]) - ) - for account_tax in custom_account_tax_ids: - for reptype, repartition in repartition_lines_iter(account_tax): - key = (reptype, repartition.repartition_type) - # keep right tags - keep_tags = get_new_tag_names( - repartition.tag_ids, correspondance[key] - ) - # fix special tags - if ( - repartition.repartition_type == "tax" - and len(keep_tags) > 1 - ): - if "+82" in keep_tags: - keep_tags.remove("+82") - if "-82" in keep_tags: - keep_tags.remove("-82") - # fix special tax - if account_tax.name == "VAT-IN-V81-21-EU-C1": - if reptype == "invoice": - if repartition.repartition_type == "base": - keep_tags = ["+81", "+86"] - elif repartition.repartition_type == "tax": - keep_tags = ["+59"] - elif reptype == "refund": - if repartition.repartition_type == "base": - keep_tags = ["-81", "-86", "+84"] - elif repartition.repartition_type == "tax": - keep_tags = [] - if account_tax.name == "VAT-IN-V81-21-EU-C2": - if reptype == "invoice": - if repartition.repartition_type == "base": - keep_tags = ["+81", "+86"] - elif repartition.repartition_type == "tax": - keep_tags = ["-55"] - elif reptype == "refund": - if repartition.repartition_type == "base": - keep_tags = ["-81", "-86", "+84"] - elif repartition.repartition_type == "tax": - keep_tags = [] - # convert tags - new_tags = env["account.account.tag"] - for new_name in keep_tags: - new_tag = env["account.account.tag"].search( - [("name", "=", new_name)], limit=1, - ) - new_tags |= new_tag - repartition.tag_ids = new_tags - def update_tags_on_move_line(env): """Based on new account.tax, this function check that @@ -255,8 +94,8 @@ def update_tags_on_move_line(env): if not repartition_id: _logger.error( "No account.tax.repartition.line found for " - "account.move.line(%s)." - % move_line_id.id + "account.move.line(%s).", + move_line_id.id ) new_tag_ids = tax_repartition_id.tag_ids @@ -358,6 +197,7 @@ def disable_troublesome_tags(env): def migrate(env, version): remove_wrong_tag(env) update_custom_account_tax(env) + update_account_tax_based_on_templates(env) update_tags_on_move_line(env) unlink_tags_from_move_line( env, base_tag_xmlids + tax_tag_xmlids + not_deductible_tag_xmlids diff --git a/addons/l10n_be/migrations/13.0.2.0/tax_template.py b/addons/l10n_be/migrations/13.0.2.0/tax_template.py new file mode 100644 index 000000000000..b76d97dc1644 --- /dev/null +++ b/addons/l10n_be/migrations/13.0.2.0/tax_template.py @@ -0,0 +1,811 @@ +from openupgradelib import openupgrade +import logging + +_logger = logging.getLogger(__name__) + + +ACCOUNT_TAX_NAMES = [ + # In version 9.0 + { + "attn_VAT-OUT-21-S": "21% Services", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% Services", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% Services", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% Services", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocontractant", + "attn_VAT-OUT-00-EU-S": "0% EU Services", + "attn_VAT-OUT-00-EU-L": "0% EU L", + "attn_VAT-OUT-00-EU-T": "0% EU T", + "attn_VAT-OUT-00-ROW": "0% Export Non EU", + "attn_VAT-IN-V81-21": "21% Marchandises", + "attn_VAT-IN-V81-12": "12% Marchandises", + "attn_VAT-IN-V81-06": "6% Marchandises", + "attn_VAT-IN-V81-00": "0% Marchandises", + "attn_VAT-IN-V82-21-S": "21% Services", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% Services", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% Services", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% Services", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 10.0 + { + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 11.0 + { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, + + # In version 12.0 + { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, +] + + +def _get_old_account_tax_names(xmlid): + """ + Return a list of old names for the account.tax given matching the + xmlid. + """ + names = [] + for version in ACCOUNT_TAX_NAMES: + name = version.get(xmlid) + if name: + names.append(name) + return names + + +def _get_tags_from_repartition_line_tmpl(env, repartition_line_tmpl): + """ + Return the tags linked to an account.tax.repartition.line.template + """ + tag_names = [] + for report_line in repartition_line_tmpl.plus_report_line_ids: + tag_names.append("+" + report_line.tag_name) + for report_line in repartition_line_tmpl.minus_report_line_ids: + tag_names.append("-" + report_line.tag_name) + return env["account.account.tag"].search([("name", "in", tag_names)]) + + +def _is_account_tax_used(env, account_tax): + """Return True if account_tax is used on an account.move.line.""" + env.cr.execute( + """ + SELECT account_tax_id + FROM account_move_line_account_tax_rel + WHERE account_tax_id = %s + """, + (account_tax.id,), + ) + return len(env.cr.fetchall()) > 0 + + +def _find_account_tax(env, xmlid, account_tax_template, company_id): + """Return the account tax based on the given account.tax.template""" + current_name = account_tax_template.name + old_names = _get_old_account_tax_names(xmlid) + domain = [ + ("type_tax_use", "=", account_tax_template.type_tax_use), + ("company_id", "=", company_id.id), + ] + + if not old_names: + _logger.info( + "Skipping account.tax.template '%s', because it's a new one.", + current_name, + ) + return env["account.tax"] + + _logger.info( + "Looking for a account.tax that match account.tax.template '%s'.", + current_name + ) + account_taxes = env["account.tax"].search( + domain + [("name", "=", current_name)] + ) + + if not account_taxes: + _logger.info( + "No account.tax named '%s', searching with older names.", + current_name + ) + account_taxes = env["account.tax"].search( + domain + [("name", "in", old_names)] + ) + + nb_account_taxes = len(account_taxes) + account_taxes_used = account_taxes.filtered( + lambda r: _is_account_tax_used(env, r) + ) + + if nb_account_taxes > 1: + _logger.info( + "There is several account.tax found for the " + "account.tax.template '%s'. Trying to see which one is " + "realy used.", + current_name, + ) + + nb_account_taxes_used = len(account_taxes_used) + if nb_account_taxes_used > 1: + raise ValueError( + "There is several account.tax found for the " + "account.tax.template ID %s '%s' that are used on " + "account.move.line. Clean up " + "account.tax by renaming your specific account.tax " + "and migrate it via a dedicated script. " + "The matching account.tax ID %s" + % ( + account_tax_template.id, + current_name, + ", ".join(str(rec_id) for rec_id in account_taxes_used.ids) + ) + ) + + account_tax = account_taxes_used + + else: + account_tax = account_taxes + + if not account_tax: + _logger.error( + "No matching account.tax for the account.tax.template '%s'.", + current_name, + ) + else: + _logger.info( + "Using account.tax ID %s '%s' that correspond to the " + "account.tax.template '%s'.", + account_tax.id, + account_tax.name, + current_name, + ) + + return account_tax + + +def _find_repartition_line(account_tax, repartition_line_tmpl): + """ + Retrieve the repartition line that match the given repartition + line from the account.tax.template + """ + # Choose to search on invoice repartition lines or refund ones. + if repartition_line_tmpl.invoice_tax_id: + repartition_lines = account_tax.invoice_repartition_line_ids + else: + repartition_lines = account_tax.refund_repartition_line_ids + + repartition_lines = repartition_lines.filtered( + lambda r: r.repartition_type == repartition_line_tmpl.repartition_type + ) + + if len(repartition_lines) > 1: + repartition_lines = repartition_lines.filtered( + lambda r: r.factor_percent == repartition_line_tmpl.factor_percent + ) + + if len(repartition_lines) > 1: + repartition_lines = repartition_lines.filtered( + lambda r: r.account_id == repartition_line_tmpl.account_id + ) + + if not repartition_lines: + # TODO: maybe in this case we need to create the repartition.line ? + # Or we should delegate this to account_chart_update ? + _logger.error( + "No matching account.tax.repartition.line on account.tax ID %s " + "for the account.tax.repartition.line.template ID %s", + account_tax.id, + repartition_line_tmpl.id, + ) + elif len(repartition_lines) > 1: + _logger.error( + "Several matching account.tax.repartition.line on account.tax " + "ID %s for the account.tax.repartition.line.template ID %s." + "Found account.tax.repartition.line ID %s.", + account_tax.id, + repartition_line_tmpl.id, + ", ".join(str(rec_id) for rec_id in repartition_lines.ids), + ) + else: + _logger.info( + "Found matching account.tax.repartition.line ID %s " + "on account.tax ID %s " + "for the account.tax.repartition.line.template ID %s", + repartition_lines.id, + account_tax.id, + repartition_line_tmpl.id, + ) + + return repartition_lines + + +def _update_repartition_line(env, repartition_line, repartition_line_tmpl): + """ + Update tag of the account.tax.repartition.line based on + account.tax.repartition.line.template + + Update the following tables: + - account_account_tag_account_tax_repartition_line_rel + """ + # FIXME: I'm not sure if the table : + # - account_tax_repartition_financial_tags + # should be updated or not. + + new_tag_ids = _get_tags_from_repartition_line_tmpl(env, repartition_line_tmpl) + + # Update account_account_tag_account_tax_repartition_line_rel + openupgrade.logged_query( + env.cr, + """ + DELETE FROM account_account_tag_account_tax_repartition_line_rel + WHERE account_tax_repartition_line_id = %s; + """, + (repartition_line.id,) + ) + for new_tag_id in new_tag_ids: + openupgrade.logged_query( + env.cr, + """ + INSERT INTO account_account_tag_account_tax_repartition_line_rel + (account_tax_repartition_line_id, account_account_tag_id) + VALUES (%s, %s) + """, + (repartition_line.id, new_tag_id.id), + ) + + +def _get_account_tax_templates_iterator(env): + """ + Return account.tax.template with their xmlid + """ + module = "l10n_be" + data = env['ir.model.data'].search([ + ('model', '=', 'account.tax.template'), + ('module', 'like', module) + ]) + for elem in data: + account_tax_template = env["account.tax.template"].browse(elem.res_id) + yield elem.name, account_tax_template + + +def _apply_new_tax_tags_on_account_tax(env, account_tax, account_tax_template): + """ + The normal migration script of module account tries to link the old + account.account.tag to account.tax.repartition.line. + Which does not reflect the new account.tax.template and new + account.account.tag which comes with positive (debit) and negative + (credit) flavors. + This function replace the old tags by the new ones. + """ + for repartition_line_tmpl in ( + account_tax_template.invoice_repartition_line_ids + + account_tax_template.refund_repartition_line_ids + ): + repartition_line = _find_repartition_line( + account_tax, repartition_line_tmpl + ) + if not repartition_line: + _logger.info( + "No account.tax.repartition.line found that match " + "the repartition line ID %s of the account.tax.template " + "ID %s '%s'", + repartition_line_tmpl.id, + account_tax_template.id, + account_tax_template.name, + ) + continue + _update_repartition_line(env, repartition_line, repartition_line_tmpl) + + +def update_account_tax_based_on_templates(env): + """ + Use account.tax.template to update existing account.tax + """ + for company in env["res.company"].search([]): + for xmlid, account_tax_template in _get_account_tax_templates_iterator(env): + account_tax = _find_account_tax(env, xmlid, account_tax_template, company) + + if not account_tax: + continue + + _apply_new_tax_tags_on_account_tax( + env, account_tax, account_tax_template + ) + + # Rename account_tax + account_tax.name = account_tax_template.name From dcba9ade42c0d97c58ffeb548cfc0e47098303b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Fri, 29 Mar 2024 14:45:06 +0100 Subject: [PATCH 08/16] [OU-IMP] l10n_be: try to split in several files --- .../{custom_taxes.py => post-00-update_custom_taxes.py} | 5 +++++ ...emplate.py => post-01-update_taxes_based_on_templates.py} | 5 +++++ .../13.0.2.0/{post-migration.py => post-02-migration.py} | 5 ----- 3 files changed, 10 insertions(+), 5 deletions(-) rename addons/l10n_be/migrations/13.0.2.0/{custom_taxes.py => post-00-update_custom_taxes.py} (98%) rename addons/l10n_be/migrations/13.0.2.0/{tax_template.py => post-01-update_taxes_based_on_templates.py} (99%) rename addons/l10n_be/migrations/13.0.2.0/{post-migration.py => post-02-migration.py} (96%) diff --git a/addons/l10n_be/migrations/13.0.2.0/custom_taxes.py b/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py similarity index 98% rename from addons/l10n_be/migrations/13.0.2.0/custom_taxes.py rename to addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py index 27a999685726..5082a8dcf0da 100644 --- a/addons/l10n_be/migrations/13.0.2.0/custom_taxes.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py @@ -144,3 +144,8 @@ def repartition_lines_iter(account_tax): ) new_tags |= new_tag repartition.tag_ids = new_tags + + +@openupgrade.migrate() +def migrate(env, version): + update_custom_account_tax(env) diff --git a/addons/l10n_be/migrations/13.0.2.0/tax_template.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py similarity index 99% rename from addons/l10n_be/migrations/13.0.2.0/tax_template.py rename to addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index b76d97dc1644..98dc0169549c 100644 --- a/addons/l10n_be/migrations/13.0.2.0/tax_template.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -809,3 +809,8 @@ def update_account_tax_based_on_templates(env): # Rename account_tax account_tax.name = account_tax_template.name + + +@openupgrade.migrate() +def migrate(env, version): + update_account_tax_based_on_templates(env) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py similarity index 96% rename from addons/l10n_be/migrations/13.0.2.0/post-migration.py rename to addons/l10n_be/migrations/13.0.2.0/post-02-migration.py index 90b6985dce85..67fa4ab00dc1 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py @@ -1,9 +1,6 @@ from openupgradelib import openupgrade import logging -from tax_template import update_account_tax_based_on_templates -from custom_taxes import update_custom_account_tax - _logger = logging.getLogger(__name__) # Based on file l10n_be/data/account_tax_template_data.xml @@ -196,8 +193,6 @@ def disable_troublesome_tags(env): @openupgrade.migrate() def migrate(env, version): remove_wrong_tag(env) - update_custom_account_tax(env) - update_account_tax_based_on_templates(env) update_tags_on_move_line(env) unlink_tags_from_move_line( env, base_tag_xmlids + tax_tag_xmlids + not_deductible_tag_xmlids From 3911785e556a7f8b804e91f003656e31efd032b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Tue, 9 Apr 2024 11:42:29 +0200 Subject: [PATCH 09/16] [OU-IMP] l10n_be: fix updating element of tax group This also clarify the process of updating existing taxes that are based on account.tax.template. --- ...post-01-update_taxes_based_on_templates.py | 1483 ++++++++++++++--- 1 file changed, 1241 insertions(+), 242 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index 98dc0169549c..40776c009c39 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -535,280 +535,1279 @@ }, ] +# Based on l10n_be/data/account_tax_template_data.xml +NEW_ACCOUNT_TAX_CONFIG = { + "attn_VAT-OUT-21-S": { + "invoice": { + "base": ["+03"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, -def _get_old_account_tax_names(xmlid): - """ - Return a list of old names for the account.tax given matching the - xmlid. - """ - names = [] - for version in ACCOUNT_TAX_NAMES: - name = version.get(xmlid) - if name: - names.append(name) - return names + "attn_VAT-OUT-21-L": { + "invoice": { + "base": ["+03"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, + "attn_VAT-OUT-12-S": { + "invoice": { + "base": ["+02"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, -def _get_tags_from_repartition_line_tmpl(env, repartition_line_tmpl): - """ - Return the tags linked to an account.tax.repartition.line.template - """ - tag_names = [] - for report_line in repartition_line_tmpl.plus_report_line_ids: - tag_names.append("+" + report_line.tag_name) - for report_line in repartition_line_tmpl.minus_report_line_ids: - tag_names.append("-" + report_line.tag_name) - return env["account.account.tag"].search([("name", "in", tag_names)]) - - -def _is_account_tax_used(env, account_tax): - """Return True if account_tax is used on an account.move.line.""" - env.cr.execute( - """ - SELECT account_tax_id - FROM account_move_line_account_tax_rel - WHERE account_tax_id = %s - """, - (account_tax.id,), - ) - return len(env.cr.fetchall()) > 0 - - -def _find_account_tax(env, xmlid, account_tax_template, company_id): - """Return the account tax based on the given account.tax.template""" - current_name = account_tax_template.name - old_names = _get_old_account_tax_names(xmlid) - domain = [ - ("type_tax_use", "=", account_tax_template.type_tax_use), - ("company_id", "=", company_id.id), - ] - - if not old_names: - _logger.info( - "Skipping account.tax.template '%s', because it's a new one.", - current_name, - ) - return env["account.tax"] + "attn_VAT-OUT-12-L": { + "invoice": { + "base": ["+02"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, - _logger.info( - "Looking for a account.tax that match account.tax.template '%s'.", - current_name - ) - account_taxes = env["account.tax"].search( - domain + [("name", "=", current_name)] - ) + "attn_VAT-OUT-06-S": { + "invoice": { + "base": ["+01"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, - if not account_taxes: - _logger.info( - "No account.tax named '%s', searching with older names.", - current_name - ) - account_taxes = env["account.tax"].search( - domain + [("name", "in", old_names)] - ) + "attn_VAT-OUT-06-L": { + "invoice": { + "base": ["+01"], + "tax": ["+54"], + }, + "refund": { + "base": ["+49"], + "tax": ["+64"], + }, + }, - nb_account_taxes = len(account_taxes) - account_taxes_used = account_taxes.filtered( - lambda r: _is_account_tax_used(env, r) - ) + "attn_VAT-OUT-00-S": { + "invoice": { + "base": ["+00"], + "tax": [], + }, + "refund": { + "base": ["+49"], + "tax": [], + }, + }, - if nb_account_taxes > 1: - _logger.info( - "There is several account.tax found for the " - "account.tax.template '%s'. Trying to see which one is " - "realy used.", - current_name, - ) + "attn_VAT-OUT-00-L": { + "invoice": { + "base": ["+00"], + "tax": [], + }, + "refund": { + "base": ["+49"], + "tax": [], + }, + }, - nb_account_taxes_used = len(account_taxes_used) - if nb_account_taxes_used > 1: - raise ValueError( - "There is several account.tax found for the " - "account.tax.template ID %s '%s' that are used on " - "account.move.line. Clean up " - "account.tax by renaming your specific account.tax " - "and migrate it via a dedicated script. " - "The matching account.tax ID %s" - % ( - account_tax_template.id, - current_name, - ", ".join(str(rec_id) for rec_id in account_taxes_used.ids) - ) - ) + "attn_VAT-OUT-00-CC": { + "invoice": { + "base": ["+45"], + "tax": [], + }, + "refund": { + "base": ["+49"], + "tax": [], + }, + }, - account_tax = account_taxes_used + "attn_VAT-OUT-00-EU-S": { + "invoice": { + "base": ["+44"], + "tax": [], + }, + "refund": { + "base": ["+48s44"], + "tax": [], + }, + }, - else: - account_tax = account_taxes + "attn_VAT-OUT-00-EU-L": { + "invoice": { + "base": ["+46L"], + "tax": [], + }, + "refund": { + "base": ["+48s46L"], + "tax": [], + }, + }, - if not account_tax: - _logger.error( - "No matching account.tax for the account.tax.template '%s'.", - current_name, - ) - else: - _logger.info( - "Using account.tax ID %s '%s' that correspond to the " - "account.tax.template '%s'.", - account_tax.id, - account_tax.name, - current_name, - ) + "attn_VAT-OUT-00-EU-T": { + "invoice": { + "base": ["+46T"], + "tax": [], + }, + "refund": { + "base": ["+48s46T"], + "tax": [], + }, + }, - return account_tax + "attn_VAT-OUT-00-ROW": { + "invoice": { + "base": ["+47"], + "tax": [], + }, + "refund": { + "base": ["+49"], + "tax": [], + }, + }, + "attn_VAT-IN-V81-21": { + "invoice": { + "base": ["+81"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81"], + "tax": ["+63"], + }, + }, -def _find_repartition_line(account_tax, repartition_line_tmpl): - """ - Retrieve the repartition line that match the given repartition - line from the account.tax.template - """ - # Choose to search on invoice repartition lines or refund ones. - if repartition_line_tmpl.invoice_tax_id: - repartition_lines = account_tax.invoice_repartition_line_ids - else: - repartition_lines = account_tax.refund_repartition_line_ids - - repartition_lines = repartition_lines.filtered( - lambda r: r.repartition_type == repartition_line_tmpl.repartition_type - ) + "attn_VAT-IN-V81-12": { + "invoice": { + "base": ["+81"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81"], + "tax": ["+63"], + }, + }, - if len(repartition_lines) > 1: - repartition_lines = repartition_lines.filtered( - lambda r: r.factor_percent == repartition_line_tmpl.factor_percent - ) + "attn_VAT-IN-V81-06": { + "invoice": { + "base": ["+81"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81"], + "tax": ["+63"], + }, + }, - if len(repartition_lines) > 1: - repartition_lines = repartition_lines.filtered( - lambda r: r.account_id == repartition_line_tmpl.account_id - ) + "attn_VAT-IN-V81-00": { + "invoice": { + "base": ["+81"], + "tax": [], + }, + "refund": { + "base": ["+85", "-81"], + "tax": [], + }, + }, - if not repartition_lines: - # TODO: maybe in this case we need to create the repartition.line ? - # Or we should delegate this to account_chart_update ? - _logger.error( - "No matching account.tax.repartition.line on account.tax ID %s " - "for the account.tax.repartition.line.template ID %s", - account_tax.id, - repartition_line_tmpl.id, - ) - elif len(repartition_lines) > 1: - _logger.error( - "Several matching account.tax.repartition.line on account.tax " - "ID %s for the account.tax.repartition.line.template ID %s." - "Found account.tax.repartition.line ID %s.", - account_tax.id, - repartition_line_tmpl.id, - ", ".join(str(rec_id) for rec_id in repartition_lines.ids), - ) - else: - _logger.info( - "Found matching account.tax.repartition.line ID %s " - "on account.tax ID %s " - "for the account.tax.repartition.line.template ID %s", - repartition_lines.id, - account_tax.id, - repartition_line_tmpl.id, - ) + "attn_TVA-21-inclus-dans-prix": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, - return repartition_lines + "attn_VAT-IN-V82-21-S": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, + "attn_VAT-IN-V82-21-G": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, -def _update_repartition_line(env, repartition_line, repartition_line_tmpl): - """ - Update tag of the account.tax.repartition.line based on - account.tax.repartition.line.template + "attn_VAT-IN-V82-12-S": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, - Update the following tables: - - account_account_tag_account_tax_repartition_line_rel - """ - # FIXME: I'm not sure if the table : - # - account_tax_repartition_financial_tags - # should be updated or not. - - new_tag_ids = _get_tags_from_repartition_line_tmpl(env, repartition_line_tmpl) - - # Update account_account_tag_account_tax_repartition_line_rel - openupgrade.logged_query( - env.cr, - """ - DELETE FROM account_account_tag_account_tax_repartition_line_rel - WHERE account_tax_repartition_line_id = %s; - """, - (repartition_line.id,) - ) - for new_tag_id in new_tag_ids: - openupgrade.logged_query( - env.cr, - """ - INSERT INTO account_account_tag_account_tax_repartition_line_rel - (account_tax_repartition_line_id, account_account_tag_id) - VALUES (%s, %s) - """, - (repartition_line.id, new_tag_id.id), - ) + "attn_VAT-IN-V82-12-G": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, + "attn_VAT-IN-V82-06-S": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, -def _get_account_tax_templates_iterator(env): - """ - Return account.tax.template with their xmlid - """ - module = "l10n_be" - data = env['ir.model.data'].search([ - ('model', '=', 'account.tax.template'), - ('module', 'like', module) - ]) - for elem in data: - account_tax_template = env["account.tax.template"].browse(elem.res_id) - yield elem.name, account_tax_template + "attn_VAT-IN-V82-06-G": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, + "attn_VAT-IN-V82-00-S": { + "invoice": { + "base": ["+82"], + "tax": [], + }, + "refund": { + "base": ["+85", "-82"], + "tax": [], + }, + }, -def _apply_new_tax_tags_on_account_tax(env, account_tax, account_tax_template): - """ - The normal migration script of module account tries to link the old - account.account.tag to account.tax.repartition.line. - Which does not reflect the new account.tax.template and new - account.account.tag which comes with positive (debit) and negative - (credit) flavors. - This function replace the old tags by the new ones. - """ - for repartition_line_tmpl in ( - account_tax_template.invoice_repartition_line_ids - + account_tax_template.refund_repartition_line_ids - ): - repartition_line = _find_repartition_line( - account_tax, repartition_line_tmpl + "attn_VAT-IN-V82-00-G": { + "invoice": { + "base": ["+82"], + "tax": [], + }, + "refund": { + "base": ["+85", "-82"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21": { + "invoice": { + "base": ["+83"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83"], + "tax": ["+63"], + }, + }, + + "attn_VAT-IN-V83-12": { + "invoice": { + "base": ["+83"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83"], + "tax": ["+63"], + }, + }, + + "attn_VAT-IN-V83-06": { + "invoice": { + "base": ["+83"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83"], + "tax": ["+63"], + }, + }, + + "attn_VAT-IN-V83-00": { + "invoice": { + "base": ["+83"], + "tax": [], + }, + "refund": { + "base": ["+85", "-83"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-21-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-21-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + + "attn_VAT-IN-V81-12-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-12-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + + "attn_VAT-IN-V81-06-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-06-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + + "attn_VAT-IN-V81-00-CC": { + "invoice": { + "base": ["+81", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + + "attn_VAT-IN-V82-12-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-12-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + + "attn_VAT-IN-V82-06-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-06-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + + "attn_VAT-IN-V82-00-CC": { + "invoice": { + "base": ["+82", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + + "attn_VAT-IN-V83-12-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-12-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + + "attn_VAT-IN-V83-06-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-06-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+56"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + + "attn_VAT-IN-V83-00-CC": { + "invoice": { + "base": ["+83", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-CAR-EXC-C1": { + "invoice": { + "base": ["+82"], + "tax": ["+82"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+85", "-82"], + }, + }, + + "attn_VAT-IN-V82-CAR-EXC-C2": { + "invoice": { + "base": ["+82"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82"], + "tax": ["+63"], + }, + }, + + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + + "attn_VAT-IN-V81-21-EU-C1": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-21-EU-C2": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-21-EU": "21% EU M.", + + "attn_VAT-IN-V81-12-EU-C1": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-12-EU-C2": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-12-EU": "12% EU M.", + + "attn_VAT-IN-V81-06-EU-C1": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-06-EU-C2": { + "invoice": { + "base": ["+81", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-06-EU": "6% EU M.", + + "attn_VAT-IN-V81-00-EU": { + "invoice": { + "base": ["+81", "+86"], + "tax": [], + }, + "refund": { + "base": ["+84", "-81", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-EU-S-C1": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-EU-S-C2": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + + "attn_VAT-IN-V82-21-EU-G-C1": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-EU-G-C2": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + + "attn_VAT-IN-V82-12-EU-S-C1": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-12-EU-S-C2": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + + "attn_VAT-IN-V82-12-EU-G-C1": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-12-EU-G-C2": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + + "attn_VAT-IN-V82-06-EU-S-C1": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-06-EU-S-C2": { + "invoice": { + "base": ["+82", "+88"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + + "attn_VAT-IN-V82-06-EU-G-C1": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-06-EU-G-C2": { + "invoice": { + "base": ["+82", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + + "attn_VAT-IN-V82-00-EU-S": { + "invoice": { + "base": ["+82", "+88"], + "tax": [], + }, + "refund": { + "base": ["+84", "-82", "-88"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-EU-C1": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-EU-C2": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + + "attn_VAT-IN-V82-00-EU-G": { + "invoice": { + "base": ["+82", "+86"], + "tax": [], + }, + "refund": { + "base": ["+84", "-82", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-12-EU-C1": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-12-EU-C2": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + + "attn_VAT-IN-V83-06-EU-C1": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+59"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-06-EU-C2": { + "invoice": { + "base": ["+83", "+86"], + "tax": ["+55"], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + + "attn_VAT-IN-V83-00-EU": { + "invoice": { + "base": ["+83", "+86"], + "tax": [], + }, + "refund": { + "base": ["+84", "-83", "-86"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-21-ROW-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-21-ROW-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + + "attn_VAT-IN-V81-12-ROW-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-12-ROW-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + + "attn_VAT-IN-V81-06-ROW-CC-C1": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V81-06-ROW-CC-C2": { + "invoice": { + "base": ["+81", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + + "attn_VAT-IN-V81-00-ROW-CC": { + "invoice": { + "base": ["+81", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-81", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-ROW-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-21-ROW-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + + "attn_VAT-IN-V82-12-ROW-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-12-ROW-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + + "attn_VAT-IN-V82-06-ROW-CC-C1": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V82-06-ROW-CC-C2": { + "invoice": { + "base": ["+82", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + + "attn_VAT-IN-V82-00-ROW-CC": { + "invoice": { + "base": ["+82", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-82", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-ROW-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-21-ROW-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + + "attn_VAT-IN-V83-12-ROW-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-12-ROW-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + + "attn_VAT-IN-V83-06-ROW-CC-C1": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+59"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + "attn_VAT-IN-V83-06-ROW-CC-C2": { + "invoice": { + "base": ["+83", "+87"], + "tax": ["+57"], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + # group tax seed child taxes (above) + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + + "attn_VAT-IN-V83-00-ROW-CC": { + "invoice": { + "base": ["+83", "+87"], + "tax": [], + }, + "refund": { + "base": ["+85", "-83", "-87"], + "tax": [], + }, + }, + + # FIXME: not sure how to manage these items + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", +} + + +def _get_account_tax_template_xmlid(search_name): + """Return the first account.tax.template xmlid that match name""" + for version in ACCOUNT_TAX_NAMES: + for xmlid, name in version.items(): + if search_name == name: + return xmlid + return None + + +def _get_tags(env, names): + """Get records for account.account.tag that maches names""" + tags = env["account.account.tag"] + for name in names: + tag = env["account.account.tag"].search( + [("name", "=", name)], limit=1, ) - if not repartition_line: - _logger.info( - "No account.tax.repartition.line found that match " - "the repartition line ID %s of the account.tax.template " - "ID %s '%s'", - repartition_line_tmpl.id, - account_tax_template.id, - account_tax_template.name, - ) - continue - _update_repartition_line(env, repartition_line, repartition_line_tmpl) + tags |= tag + return tags + +def _repartition_lines_iter(account_tax): + """Special loop over repartition lines in an account.tax""" + for repartition in account_tax.invoice_repartition_line_ids: + yield ("invoice", repartition) + for repartition in account_tax.refund_repartition_line_ids: + yield ("refund", repartition) def update_account_tax_based_on_templates(env): """ Use account.tax.template to update existing account.tax """ - for company in env["res.company"].search([]): - for xmlid, account_tax_template in _get_account_tax_templates_iterator(env): - account_tax = _find_account_tax(env, xmlid, account_tax_template, company) - - if not account_tax: - continue - - _apply_new_tax_tags_on_account_tax( - env, account_tax, account_tax_template - ) - - # Rename account_tax - account_tax.name = account_tax_template.name + account_tax_ids = ( + env["account.tax"] + .with_context(active_test=False) + .search([]) + ) + for account_tax in account_tax_ids: + xmlid = _get_account_tax_template_xmlid(account_tax.name) + new_config = NEW_ACCOUNT_TAX_CONFIG.get(xmlid) + if isinstance(new_config, dict): + for reptype, repartition in _repartition_lines_iter(account_tax): + repartition.tag_ids = _get_tags( + env, + new_config[reptype][repartition.repartition_type], + ) @openupgrade.migrate() From 7aae914ec501b883fc643a744ba9152a8a4b7f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 10 Apr 2024 18:52:44 +0200 Subject: [PATCH 10/16] [OU-IMP] l10n_be: manage custom group tax --- .../13.0.2.0/post-00-update_custom_taxes.py | 49 +++++++++++++++---- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py b/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py index 5082a8dcf0da..05948db64462 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-00-update_custom_taxes.py @@ -70,13 +70,7 @@ def update_custom_account_tax(env): - """This function tries to update custom account.tax that does not - match a account.tax.template. - - This function should be run after update_account_tax which will - adapt existing taxes based on account.tax.template, and rename it - accordingly. - """ + """This function tries to update custom account.tax""" # get old tags and extract their code names correspondance = { ("invoice", "base"): [ @@ -97,6 +91,30 @@ def update_custom_account_tax(env): ], } + def get_parent_tax_tags(account_tax): + """Return old tags that were linked on the parent tax if any""" + parent_tax_id = ( + env["account.tax"] + .with_context(active_test=False) + .search([("children_tax_ids", "in", account_tax.id)], limit=1) + ) + if not parent_tax_id: + return None + env.cr.execute( + """SELECT account_account_tag_id + FROM account_tax_account_tag + WHERE account_tax_id = %s + """, + (parent_tax_id.id,), + ) + parent_tax_tags = [int(res[0]) for res in env.cr.fetchall()] + parent_tax_tag_ids = ( + env["account.account.tag"] + .with_context(active_test=False) + .search([("id", "in", parent_tax_tags)]) + ) + return parent_tax_tag_ids + def get_new_tag_names(tag_ids, old_tags): """Return list of code and old_tags for tag_ids that exists in old_tags @@ -121,13 +139,24 @@ def repartition_lines_iter(account_tax): .search([]) ) for account_tax in custom_account_tax_ids: + parent_tax_tag_ids = get_parent_tax_tags(account_tax) for reptype, repartition in repartition_lines_iter(account_tax): key = (reptype, repartition.repartition_type) # keep right tags - keep_tags = get_new_tag_names( - repartition.tag_ids, correspondance[key] - ) + if ( + repartition.repartition_type == "base" + and parent_tax_tag_ids is not None + ): + keep_tags = get_new_tag_names( + parent_tax_tag_ids, correspondance[key] + ) + else: + keep_tags = get_new_tag_names( + repartition.tag_ids, correspondance[key] + ) # fix special cases + # tag "82" can not be set on tax lines if other tags are + # assigned to these tax lines if ( repartition.repartition_type == "tax" and len(keep_tags) > 1 From fb7920877f1f43ef7fb2d54915aea1c332d5ce28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 10 Apr 2024 22:15:41 +0200 Subject: [PATCH 11/16] [OU-IMP] l10n_be: distinguish taxes with same name --- ...post-01-update_taxes_based_on_templates.py | 1053 +++++++++-------- 1 file changed, 537 insertions(+), 516 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index 40776c009c39..ffbab844583e 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -7,531 +7,545 @@ ACCOUNT_TAX_NAMES = [ # In version 9.0 { - "attn_VAT-OUT-21-S": "21% Services", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% Services", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% Services", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% Services", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocontractant", - "attn_VAT-OUT-00-EU-S": "0% EU Services", - "attn_VAT-OUT-00-EU-L": "0% EU L", - "attn_VAT-OUT-00-EU-T": "0% EU T", - "attn_VAT-OUT-00-ROW": "0% Export Non EU", - "attn_VAT-IN-V81-21": "21% Marchandises", - "attn_VAT-IN-V81-12": "12% Marchandises", - "attn_VAT-IN-V81-06": "6% Marchandises", - "attn_VAT-IN-V81-00": "0% Marchandises", - "attn_VAT-IN-V82-21-S": "21% Services", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% Services", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% Services", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% Services", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", - "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", - "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", - "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", - "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", - "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", - "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", - "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", - "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", - "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", - "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", - "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", - "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", - "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", - "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", - "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", - "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", - "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", - "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", - "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", - "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", - "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", - "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", - "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", - "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", - "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", - "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", - "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", - "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", - "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", - "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", - "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", - "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", - "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", - "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", - "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", - "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", - "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", - "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", - "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", - "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", - "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", - "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", - "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", - "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", - "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", - "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", - "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", - "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", - "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", - "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", - "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", - "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", - "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", - "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", - "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", - "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", - "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", - "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", - "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", - "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", - "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", - "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", - "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", - "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", - "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", - "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", - "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", - "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", - "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", - "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + "sale": { + "attn_VAT-OUT-21-S": "21% Services", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% Services", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% Services", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% Services", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocontractant", + "attn_VAT-OUT-00-EU-S": "0% EU Services", + "attn_VAT-OUT-00-EU-L": "0% EU L", + "attn_VAT-OUT-00-EU-T": "0% EU T", + "attn_VAT-OUT-00-ROW": "0% Export Non EU", + }, + "other": { + "attn_VAT-IN-V81-21": "21% Marchandises", + "attn_VAT-IN-V81-12": "12% Marchandises", + "attn_VAT-IN-V81-06": "6% Marchandises", + "attn_VAT-IN-V81-00": "0% Marchandises", + "attn_VAT-IN-V82-21-S": "21% Services", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% Services", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% Services", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% Services", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, }, # In version 10.0 { - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", - "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", - "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", - "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", - "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", - "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", - "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", - "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", - "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", - "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", - "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", - "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", - "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", - "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", - "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", - "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", - "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", - "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", - "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", - "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", - "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", - "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", - "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", - "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", - "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", - "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", - "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", - "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", - "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", - "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", - "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", - "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", - "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", - "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", - "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", - "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", - "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", - "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", - "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", - "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", - "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", - "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", - "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", - "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", - "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", - "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", - "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", - "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", - "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", - "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", - "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", - "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", - "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", - "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", - "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", - "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", - "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", - "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", - "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", - "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", - "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", - "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", - "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", - "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", - "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", - "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", - "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", - "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", - "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", - "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", - "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", - "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", - "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + "other": { + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "VAT-IN-V81-21-CC-C1", + "attn_VAT-IN-V81-21-CC-C2": "VAT-IN-V81-21-CC-C2", + "attn_VAT-IN-V81-21-CC": "21% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-CC-C1": "VAT-IN-V81-12-CC-C1", + "attn_VAT-IN-V81-12-CC-C2": "VAT-IN-V81-12-CC-C2", + "attn_VAT-IN-V81-12-CC": "12% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-CC-C1": "VAT-IN-V81-06-CC-C1", + "attn_VAT-IN-V81-06-CC-C2": "VAT-IN-V81-06-CC-C2", + "attn_VAT-IN-V81-06-CC": "TVA Déductible 6% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-CC": "TVA à l'entrée 0% Cocontract. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-CC-C1": "VAT-IN-V82-21-CC-C1", + "attn_VAT-IN-V82-21-CC-C2": "VAT-IN-V82-21-CC-C2", + "attn_VAT-IN-V82-21-CC": "TVA Déductible 21% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-12-CC-C1": "VAT-IN-V82-12-CC-C1", + "attn_VAT-IN-V82-12-CC-C2": "VAT-IN-V82-12-CC-C2", + "attn_VAT-IN-V82-12-CC": "TVA Déductible 12% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-06-CC-C1": "VAT-IN-V82-06-CC-C1", + "attn_VAT-IN-V82-06-CC-C2": "VAT-IN-V82-06-CC-C2", + "attn_VAT-IN-V82-06-CC": "TVA Déductible 6% Cocontract. - Services and other goods", + "attn_VAT-IN-V82-00-CC": "TVA à l'entrée 0% Cocontract. - Services and other goods", + "attn_VAT-IN-V83-21-CC-C1": "VAT-IN-V83-21-CC-C1", + "attn_VAT-IN-V83-21-CC-C2": "VAT-IN-V83-21-CC-C2", + "attn_VAT-IN-V83-21-CC": "TVA Déductible 21% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "VAT-IN-V83-12-CC-C1", + "attn_VAT-IN-V83-12-CC-C2": "VAT-IN-V83-12-CC-C2", + "attn_VAT-IN-V83-12-CC": "TVA Déductible 12% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "VAT-IN-V83-06-CC-C1", + "attn_VAT-IN-V83-06-CC-C2": "VAT-IN-V83-06-CC-C2", + "attn_VAT-IN-V83-06-CC": "TVA Déductible 6% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "TVA à l'entrée 0% Cocontract. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "Frais de voiture - TVA 50% Non Deductible", + "attn_VAT-IN-V82-CAR-EXC-C2": "Frais de voiture - TVA 50% Deductible (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "TVA Entrant - Frais de voiture - VAT 50% Non Deductible (Price Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "VAT-IN-V81-21-EU-C1", + "attn_VAT-IN-V81-21-EU-C2": "VAT-IN-V81-21-EU-C2", + "attn_VAT-IN-V81-21-EU": "TVA Déductible 21% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-EU-C1": "VAT-IN-V81-12-EU-C1", + "attn_VAT-IN-V81-12-EU-C2": "VAT-IN-V81-12-EU-C2", + "attn_VAT-IN-V81-12-EU": "TVA Déductible 12% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-EU-C1": "VAT-IN-V81-06-EU-C1", + "attn_VAT-IN-V81-06-EU-C2": "VAT-IN-V81-06-EU-C2", + "attn_VAT-IN-V81-06-EU": "TVA Déductible 6% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-EU": "TVA à l'entrée 0% Intracomm. - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-EU-S-C1": "VAT-IN-V82-21-EU-S-C1", + "attn_VAT-IN-V82-21-EU-S-C2": "VAT-IN-V82-21-EU-S-C2", + "attn_VAT-IN-V82-21-EU-S": "TVA Déductible 21% Intracomm. - Services", + "attn_VAT-IN-V82-21-EU-G-C1": "VAT-IN-V82-21-EU-G-C1", + "attn_VAT-IN-V82-21-EU-G-C2": "VAT-IN-V82-21-EU-G-C2", + "attn_VAT-IN-V82-21-EU-G": "TVA Déductible 21% Intracomm. - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "VAT-IN-V82-12-EU-S-C1", + "attn_VAT-IN-V82-12-EU-S-C2": "VAT-IN-V82-12-EU-S-C2", + "attn_VAT-IN-V82-12-EU-S": "TVA Déductible 12% Intracomm. - Services", + "attn_VAT-IN-V82-12-EU-G-C1": "VAT-IN-V82-12-EU-G-C1", + "attn_VAT-IN-V82-12-EU-G-C2": "VAT-IN-V82-12-EU-G-C2", + "attn_VAT-IN-V82-12-EU-G": "TVA Déductible 12% Intracomm. - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "VAT-IN-V82-06-EU-S-C1", + "attn_VAT-IN-V82-06-EU-S-C2": "VAT-IN-V82-06-EU-S-C2", + "attn_VAT-IN-V82-06-EU-S": "TVA Déductible 6% Intracomm. - Services", + "attn_VAT-IN-V82-06-EU-G-C1": "VAT-IN-V82-06-EU-G-C1", + "attn_VAT-IN-V82-06-EU-G-C2": "VAT-IN-V82-06-EU-G-C2", + "attn_VAT-IN-V82-06-EU-G": "TVA Déductible 6% Intracomm. - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "TVA à l'entrée 0% Intracomm. - Services", + "attn_VAT-IN-V83-21-EU-C1": "VAT-IN-V83-21-EU-C1", + "attn_VAT-IN-V83-21-EU-C2": "VAT-IN-V83-21-EU-C2", + "attn_VAT-IN-V83-21-EU": "TVA Déductible 21% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "TVA à l'entrée 0% Intracomm. - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "VAT-IN-V83-12-EU-C1", + "attn_VAT-IN-V83-12-EU-C2": "VAT-IN-V83-12-EU-C2", + "attn_VAT-IN-V83-12-EU": "TVA Déductible 12% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "VAT-IN-V83-06-EU-C1", + "attn_VAT-IN-V83-06-EU-C2": "VAT-IN-V83-06-EU-C2", + "attn_VAT-IN-V83-06-EU": "TVA Déductible 6% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "TVA à l'entrée 0% Intracomm. - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "VAT-IN-V81-21-ROW-CC-C1", + "attn_VAT-IN-V81-21-ROW-CC-C2": "VAT-IN-V81-21-ROW-CC-C2", + "attn_VAT-IN-V81-21-ROW-CC": "TVA Déductible 21% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-12-ROW-CC-C1": "VAT-IN-V81-12-ROW-CC-C1", + "attn_VAT-IN-V81-12-ROW-CC-C2": "VAT-IN-V81-12-ROW-CC-C2", + "attn_VAT-IN-V81-12-ROW-CC": "TVA Déductible 12% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-06-ROW-CC-C1": "VAT-IN-V81-06-ROW-CC-C1", + "attn_VAT-IN-V81-06-ROW-CC-C2": "VAT-IN-V81-06-ROW-CC-C2", + "attn_VAT-IN-V81-06-ROW-CC": "TVA Déductible 6% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V81-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Approvisionn. et marchandises", + "attn_VAT-IN-V82-21-ROW-CC-C1": "VAT-IN-V82-21-ROW-CC-C1", + "attn_VAT-IN-V82-21-ROW-CC-C2": "VAT-IN-V82-21-ROW-CC-C2", + "attn_VAT-IN-V82-21-ROW-CC": "TVA Déductible 21% Hors EU - Services and other goods", + "attn_VAT-IN-V82-12-ROW-CC-C1": "VAT-IN-V82-12-ROW-CC-C1", + "attn_VAT-IN-V82-12-ROW-CC-C2": "VAT-IN-V82-12-ROW-CC-C2", + "attn_VAT-IN-V82-12-ROW-CC": "TVA Déductible 12% Hors EU - Services and other goods", + "attn_VAT-IN-V82-06-ROW-CC-C1": "VAT-IN-V82-06-ROW-CC-C1", + "attn_VAT-IN-V82-06-ROW-CC-C2": "VAT-IN-V82-06-ROW-CC-C2", + "attn_VAT-IN-V82-06-ROW-CC": "TVA Déductible 6% Hors EU - Services and other goods", + "attn_VAT-IN-V82-00-ROW-CC": "TVA à l'entrée 0% Hors EU - Services and other goods", + "attn_VAT-IN-V83-21-ROW-CC-C1": "VAT-IN-V83-21-ROW-CC-C1", + "attn_VAT-IN-V83-21-ROW-CC-C2": "VAT-IN-V83-21-ROW-CC-C2", + "attn_VAT-IN-V83-21-ROW-CC": "TVA Déductible 21% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "VAT-IN-V83-12-ROW-CC-C1", + "attn_VAT-IN-V83-12-ROW-CC-C2": "VAT-IN-V83-12-ROW-CC-C2", + "attn_VAT-IN-V83-12-ROW-CC": "TVA Déductible 12% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "VAT-IN-V83-06-ROW-CC-C1", + "attn_VAT-IN-V83-06-ROW-CC-C2": "VAT-IN-V83-06-ROW-CC-C2", + "attn_VAT-IN-V83-06-ROW-CC": "TVA Déductible 6% Hors EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, }, # In version 11.0 { - "attn_VAT-OUT-21-S": "21% S.", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% S.", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% S.", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% S.", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocont.", - "attn_VAT-OUT-00-EU-S": "0% EU S.", - "attn_VAT-OUT-00-EU-L": "0% EU M.", - "attn_VAT-OUT-00-EU-T": "0% EU T.", - "attn_VAT-OUT-00-ROW": "0% Non EU", - "attn_VAT-IN-V81-21": "21% M.", - "attn_VAT-IN-V81-12": "12% M.", - "attn_VAT-IN-V81-06": "6% M.", - "attn_VAT-IN-V81-00": "0% M.", - "attn_TVA-21-inclus-dans-prix": "21% S. TTC", - "attn_VAT-IN-V82-21-S": "21% S.", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% S.", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% S.", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% S.", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", - "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", - "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", - "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", - "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", - "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", - "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", - "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", - "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", - "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", - "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", - "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", - "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", - "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", - "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", - "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", - "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", - "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", - "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", - "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", - "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", - "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", - "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", - "attn_VAT-IN-V81-21-EU": "21% EU M.", - "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", - "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", - "attn_VAT-IN-V81-12-EU": "12% EU M.", - "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", - "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", - "attn_VAT-IN-V81-06-EU": "6% EU M.", - "attn_VAT-IN-V81-00-EU": "0% EU M.", - "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", - "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", - "attn_VAT-IN-V82-21-EU-S": "21% EU S.", - "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", - "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", - "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", - "attn_VAT-IN-V82-12-EU-S": "12% EU S.", - "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", - "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", - "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", - "attn_VAT-IN-V82-06-EU-S": "6% EU S.", - "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", - "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "0% EU S.", - "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", - "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", - "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", - "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", - "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", - "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", - "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", - "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", - "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", - "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", - "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", - "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", - "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", - "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", - "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", - "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", - "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", - "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", - "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", - "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", - "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + "sale": { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + }, + "other": { + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, }, # In version 12.0 { - "attn_VAT-OUT-21-S": "21% S.", - "attn_VAT-OUT-21-L": "21%", - "attn_VAT-OUT-12-S": "12% S.", - "attn_VAT-OUT-12-L": "12%", - "attn_VAT-OUT-06-S": "6% S.", - "attn_VAT-OUT-06-L": "6%", - "attn_VAT-OUT-00-S": "0% S.", - "attn_VAT-OUT-00-L": "0%", - "attn_VAT-OUT-00-CC": "0% Cocont.", - "attn_VAT-OUT-00-EU-S": "0% EU S.", - "attn_VAT-OUT-00-EU-L": "0% EU M.", - "attn_VAT-OUT-00-EU-T": "0% EU T.", - "attn_VAT-OUT-00-ROW": "0% Non EU", - "attn_VAT-IN-V81-21": "21% M.", - "attn_VAT-IN-V81-12": "12% M.", - "attn_VAT-IN-V81-06": "6% M.", - "attn_VAT-IN-V81-00": "0% M.", - "attn_TVA-21-inclus-dans-prix": "21% S. TTC", - "attn_VAT-IN-V82-21-S": "21% S.", - "attn_VAT-IN-V82-21-G": "21% Biens divers", - "attn_VAT-IN-V82-12-S": "12% S.", - "attn_VAT-IN-V82-12-G": "12% Biens divers", - "attn_VAT-IN-V82-06-S": "6% S.", - "attn_VAT-IN-V82-06-G": "6% Biens divers", - "attn_VAT-IN-V82-00-S": "0% S.", - "attn_VAT-IN-V82-00-G": "0% Biens divers", - "attn_VAT-IN-V83-21": "21% Biens d'investissement", - "attn_VAT-IN-V83-12": "12% Biens d'investissement", - "attn_VAT-IN-V83-06": "6% Biens d'investissement", - "attn_VAT-IN-V83-00": "0% Biens d'investissement", - "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", - "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", - "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", - "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", - "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", - "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", - "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", - "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", - "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", - "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", - "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", - "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", - "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", - "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", - "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", - "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", - "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", - "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", - "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", - "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", - "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", - "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", - "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", - "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", - "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", - "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", - "attn_VAT-IN-V81-21-EU": "21% EU M.", - "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", - "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", - "attn_VAT-IN-V81-12-EU": "12% EU M.", - "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", - "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", - "attn_VAT-IN-V81-06-EU": "6% EU M.", - "attn_VAT-IN-V81-00-EU": "0% EU M.", - "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", - "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", - "attn_VAT-IN-V82-21-EU-S": "21% EU S.", - "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", - "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", - "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", - "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", - "attn_VAT-IN-V82-12-EU-S": "12% EU S.", - "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", - "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", - "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", - "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", - "attn_VAT-IN-V82-06-EU-S": "6% EU S.", - "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", - "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", - "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", - "attn_VAT-IN-V82-00-EU-S": "0% EU S.", - "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", - "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", - "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", - "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", - "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", - "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", - "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", - "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", - "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", - "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", - "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", - "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", - "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", - "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", - "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", - "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", - "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", - "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", - "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", - "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", - "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", - "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", - "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", - "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", - "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", - "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", - "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", - "attn_VAT-IN-V61": "Régularisation en faveur de l'état", - "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + "sale": { + "attn_VAT-OUT-21-S": "21% S.", + "attn_VAT-OUT-21-L": "21%", + "attn_VAT-OUT-12-S": "12% S.", + "attn_VAT-OUT-12-L": "12%", + "attn_VAT-OUT-06-S": "6% S.", + "attn_VAT-OUT-06-L": "6%", + "attn_VAT-OUT-00-S": "0% S.", + "attn_VAT-OUT-00-L": "0%", + "attn_VAT-OUT-00-CC": "0% Cocont.", + "attn_VAT-OUT-00-EU-S": "0% EU S.", + "attn_VAT-OUT-00-EU-L": "0% EU M.", + "attn_VAT-OUT-00-EU-T": "0% EU T.", + "attn_VAT-OUT-00-ROW": "0% Non EU", + }, + "other": { + "attn_VAT-IN-V81-21": "21% M.", + "attn_VAT-IN-V81-12": "12% M.", + "attn_VAT-IN-V81-06": "6% M.", + "attn_VAT-IN-V81-00": "0% M.", + "attn_TVA-21-inclus-dans-prix": "21% S. TTC", + "attn_VAT-IN-V82-21-S": "21% S.", + "attn_VAT-IN-V82-21-G": "21% Biens divers", + "attn_VAT-IN-V82-12-S": "12% S.", + "attn_VAT-IN-V82-12-G": "12% Biens divers", + "attn_VAT-IN-V82-06-S": "6% S.", + "attn_VAT-IN-V82-06-G": "6% Biens divers", + "attn_VAT-IN-V82-00-S": "0% S.", + "attn_VAT-IN-V82-00-G": "0% Biens divers", + "attn_VAT-IN-V83-21": "21% Biens d'investissement", + "attn_VAT-IN-V83-12": "12% Biens d'investissement", + "attn_VAT-IN-V83-06": "6% Biens d'investissement", + "attn_VAT-IN-V83-00": "0% Biens d'investissement", + "attn_VAT-IN-V81-21-CC-C1": "21% Cocont. Déductible M.", + "attn_VAT-IN-V81-21-CC-C2": "21% Cocont. Récupérable M.", + "attn_VAT-IN-V81-21-CC": "21% Cocont. M.", + "attn_VAT-IN-V81-12-CC-C1": "12% Cocont. Déductible M.", + "attn_VAT-IN-V81-12-CC-C2": "12% Cocont. Récupérable M.", + "attn_VAT-IN-V81-12-CC": "12% Cocont. M.", + "attn_VAT-IN-V81-06-CC-C1": "6% Cocont. Déductible M.", + "attn_VAT-IN-V81-06-CC-C2": "6% Cocont. Récupérable M.", + "attn_VAT-IN-V81-06-CC": "6% Cocont. M.", + "attn_VAT-IN-V81-00-CC": "0% Cocont. M.", + "attn_VAT-IN-V82-21-CC-C1": "21% Cocont. Déductible S.", + "attn_VAT-IN-V82-21-CC-C2": "21% Cocont. Récupérable S.", + "attn_VAT-IN-V82-21-CC": "21% Cocont .S.", + "attn_VAT-IN-V82-12-CC-C1": "12% Cocont. Déductible S.", + "attn_VAT-IN-V82-12-CC-C2": "12% Cocont. Récupérable S.", + "attn_VAT-IN-V82-12-CC": "12% Cocont. S.", + "attn_VAT-IN-V82-06-CC-C1": "6% Cocont. Déductible S.", + "attn_VAT-IN-V82-06-CC-C2": "6% Cocont. Récupérable S.", + "attn_VAT-IN-V82-06-CC": "6% Cocont. S.", + "attn_VAT-IN-V82-00-CC": "0% Cocont. S.", + "attn_VAT-IN-V83-21-CC-C1": "21% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-CC-C2": "21% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-CC": "21% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C1": "12% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-CC-C2": "12% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-CC": "12% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C1": "6% Cocont. Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-CC-C2": "6% Cocont. Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-CC": "6% Cocont. - Biens d'investissement", + "attn_VAT-IN-V83-00-CC": "0% Cocont. - Biens d'investissement", + "attn_VAT-IN-V82-CAR-EXC-C1": "50% Non Déductible - Frais de voiture", + "attn_VAT-IN-V82-CAR-EXC-C2": "50% Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V82-CAR-EXC": "50% Non Déductible - Frais de voiture (Prix Excl.)", + "attn_VAT-IN-V81-21-EU-C1": "21% EU Déductible M.", + "attn_VAT-IN-V81-21-EU-C2": "21% EU Récupérable M.", + "attn_VAT-IN-V81-21-EU": "21% EU M.", + "attn_VAT-IN-V81-12-EU-C1": "12% EU Déductible M.", + "attn_VAT-IN-V81-12-EU-C2": "12% EU Récupérable M.", + "attn_VAT-IN-V81-12-EU": "12% EU M.", + "attn_VAT-IN-V81-06-EU-C1": "6% EU Déductible M.", + "attn_VAT-IN-V81-06-EU-C2": "6% EU Récupérable M.", + "attn_VAT-IN-V81-06-EU": "6% EU M.", + "attn_VAT-IN-V81-00-EU": "0% EU M.", + "attn_VAT-IN-V82-21-EU-S-C1": "21% EU Déductible S.", + "attn_VAT-IN-V82-21-EU-S-C2": "21% EU Récupérable S.", + "attn_VAT-IN-V82-21-EU-S": "21% EU S.", + "attn_VAT-IN-V82-21-EU-G-C1": "21% EU Déductible - Biens divers", + "attn_VAT-IN-V82-21-EU-G-C2": "21% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-21-EU-G": "21% EU - Biens divers", + "attn_VAT-IN-V82-12-EU-S-C1": "12% EU Déductible S.", + "attn_VAT-IN-V82-12-EU-S-C2": "12% EU Récupérable S.", + "attn_VAT-IN-V82-12-EU-S": "12% EU S.", + "attn_VAT-IN-V82-12-EU-G-C1": "12% EU Déductible - Biens divers", + "attn_VAT-IN-V82-12-EU-G-C2": "TVA 12% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-12-EU-G": "12% EU - Biens divers", + "attn_VAT-IN-V82-06-EU-S-C1": "6% EU Déductible S.", + "attn_VAT-IN-V82-06-EU-S-C2": "6% EU Récupérable S.", + "attn_VAT-IN-V82-06-EU-S": "6% EU S.", + "attn_VAT-IN-V82-06-EU-G-C1": "6% EU Déductible - Biens divers", + "attn_VAT-IN-V82-06-EU-G-C2": "6% EU Récupérable - Biens divers", + "attn_VAT-IN-V82-06-EU-G": "6% EU - Biens divers", + "attn_VAT-IN-V82-00-EU-S": "0% EU S.", + "attn_VAT-IN-V83-21-EU-C1": "21% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-EU-C2": "21% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-EU": "21% EU - Biens d'investissement", + "attn_VAT-IN-V82-00-EU-G": "0% EU - Biens divers", + "attn_VAT-IN-V83-12-EU-C1": "12% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-EU-C2": "12% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-EU": "12% EU - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C1": "6% EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-EU-C2": "6% EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-EU": "6% EU - Biens d'investissement", + "attn_VAT-IN-V83-00-EU": "0% EU - Biens d'investissement", + "attn_VAT-IN-V81-21-ROW-CC-C1": "21% Non EU Déductible M.", + "attn_VAT-IN-V81-21-ROW-CC-C2": "21% Non EU Récupérable M.", + "attn_VAT-IN-V81-21-ROW-CC": "21% Non EU M.", + "attn_VAT-IN-V81-12-ROW-CC-C1": "12% Non EU Déductible M.", + "attn_VAT-IN-V81-12-ROW-CC-C2": "12% Non EU Récupérable M.", + "attn_VAT-IN-V81-12-ROW-CC": "12% Non EU M.", + "attn_VAT-IN-V81-06-ROW-CC-C1": "6% Non EU Déductible M.", + "attn_VAT-IN-V81-06-ROW-CC-C2": "6% Non EU Récupérable M.", + "attn_VAT-IN-V81-06-ROW-CC": "6% Non EU M.", + "attn_VAT-IN-V81-00-ROW-CC": "0% Non EU M.", + "attn_VAT-IN-V82-21-ROW-CC-C1": "21% Non EU Déductible S.", + "attn_VAT-IN-V82-21-ROW-CC-C2": "21% Non EU Récupérable S.", + "attn_VAT-IN-V82-21-ROW-CC": "21% Non EU S.", + "attn_VAT-IN-V82-12-ROW-CC-C1": "12% Non EU Déductible S.", + "attn_VAT-IN-V82-12-ROW-CC-C2": "12% Non EU Récupérable S.", + "attn_VAT-IN-V82-12-ROW-CC": "12% Non EU S.", + "attn_VAT-IN-V82-06-ROW-CC-C1": "6% Non EU Déductible S.", + "attn_VAT-IN-V82-06-ROW-CC-C2": "6% Non EU Récupérable S.", + "attn_VAT-IN-V82-06-ROW-CC": "6% Non EU S.", + "attn_VAT-IN-V82-00-ROW-CC": "0% Non EU S.", + "attn_VAT-IN-V83-21-ROW-CC-C1": "21% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC-C2": "21% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-21-ROW-CC": "21% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C1": "12% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC-C2": "12% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-12-ROW-CC": "12% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C1": "6% Non EU Déductible - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC-C2": "6% Non EU Récupérable - Biens d'investissement", + "attn_VAT-IN-V83-06-ROW-CC": "6% Non EU - Biens d'investissement", + "attn_VAT-IN-V83-00-ROW-CC": "0% Non EU - Biens d'investissement", + "attn_VAT-IN-V61": "Régularisation en faveur de l'état", + "attn_VAT-IN-V62": "Régularisation en faveur du déclarant", + }, }, ] @@ -1763,10 +1777,11 @@ } -def _get_account_tax_template_xmlid(search_name): +def _get_account_tax_template_xmlid(search_name, type_tax_use): """Return the first account.tax.template xmlid that match name""" for version in ACCOUNT_TAX_NAMES: - for xmlid, name in version.items(): + taxes = version.get(type_tax_use, {}) + for xmlid, name in taxes.items(): if search_name == name: return xmlid return None @@ -1800,7 +1815,13 @@ def update_account_tax_based_on_templates(env): .search([]) ) for account_tax in account_tax_ids: - xmlid = _get_account_tax_template_xmlid(account_tax.name) + if account_tax.type_tax_use == "sale": + type_group = "sale" + else: + type_group = "other" + xmlid = _get_account_tax_template_xmlid( + account_tax.name, type_group + ) new_config = NEW_ACCOUNT_TAX_CONFIG.get(xmlid) if isinstance(new_config, dict): for reptype, repartition in _repartition_lines_iter(account_tax): From 2ee912a930b64321468dc7198d6aca9cc0064206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 11 Apr 2024 10:08:52 +0200 Subject: [PATCH 12/16] [OU-IMP] l10n_be: fix move.line of type entry --- .../migrations/13.0.2.0/post-02-migration.py | 54 +++++++++++++++---- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py b/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py index 67fa4ab00dc1..1df9c5cf8721 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-02-migration.py @@ -53,6 +53,7 @@ def update_tags_on_move_line(env): """Based on new account.tax, this function check that account.account.tag on account.move.line are correct. """ + _logger.info("Begin updating tags on account.move.line") account_move_line_ids = ( env["account.move.line"] .with_context(active_test=False) @@ -64,17 +65,30 @@ def update_tags_on_move_line(env): tax_line_id = move_line_id.tax_line_id tax_ids = move_line_id.tax_ids tax_base_amount = move_line_id.tax_base_amount + _logger.info("Processing %s", move_line_id) # If a repartition line exists then apply tags form this # repartition line if repartition_id: new_tag_ids = repartition_id.tag_ids + _logger.info( + "Found %s on %s, using tags from it: %s", + repartition_id, + move_line_id, + new_tag_ids, + ) - # If tax_lin_id exists, then find the right repartition line and + # If tax_line_id exists, then find the right repartition line and # apply tags from this repartition line elif tax_line_id: + _logger.info( + "Found tax_line_id (%s) on %s." + " Searching for repartition_line.", + tax_line_id, + move_line_id + ) repartition_line_ids = env["account.tax.repartition.line"] - if "invoice" in move_id.type: + if "invoice" in move_id.type or "entry" in move_id.type: repartition_line_ids = tax_line_id.invoice_repartition_line_ids elif "refund" in move_id.type: repartition_line_ids = tax_line_id.refund_repartition_line_ids @@ -90,32 +104,53 @@ def update_tags_on_move_line(env): tax_repartition_id = tax_repartition_ids if not repartition_id: _logger.error( - "No account.tax.repartition.line found for " - "account.move.line(%s).", - move_line_id.id + "No account.tax.repartition.line found for %s", + move_line_id, ) new_tag_ids = tax_repartition_id.tag_ids + _logger.info( + "Found %s to apply on %s, using tags from it: %s.", + tax_repartition_id, + move_line_id, + new_tag_ids, + ) # If tax_ids exists and the tax_base_amount is 0 or null # then it's a base line, so apply base repartition line from # taxes. elif tax_ids and not tax_base_amount: - repartition_line_ids = env["account.tax.repartition.line"] - if "invoice" in move_id.type: - repartition_line_ids = tax_ids.mapped( + taxes = tax_ids | tax_ids.mapped("children_tax_ids") + _logger.info( + "Found taxes %s to apply on %s linked to %s with type %s", + taxes, + move_line_id, + move_id, + move_id.type, + ) + if "invoice" in move_id.type or "entry" in move_id.type: + repartition_line_ids = taxes.mapped( "invoice_repartition_line_ids" ) elif "refund" in move_id.type: - repartition_line_ids = tax_ids.mapped( + repartition_line_ids = taxes.mapped( "refund_repartition_line_ids" ) + else: + repartition_line_ids = env["account.tax.repartition.line"] base_repartition_ids = repartition_line_ids.filtered( lambda r: r.repartition_type == "base" ) new_tag_ids = base_repartition_ids.mapped("tag_ids") + _logger.info( + "Found %s to apply on %s, using tags from it: %s.", + base_repartition_ids, + move_line_id, + new_tag_ids, + ) else: new_tag_ids = env["account.account.tag"] + _logger.info("No tag to apply on %s", move_line_id) # Write new tags openupgrade.logged_query( @@ -138,6 +173,7 @@ def update_tags_on_move_line(env): """, (move_line_id.id, new_tag_id.id), ) + _logger.info("Finish updating tags on account.move.line") def remove_wrong_tag(env): From 42f917404242cb466574c98470550bbdfae449b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 18 Apr 2024 15:03:53 +0200 Subject: [PATCH 13/16] [OU-FIX] l10n_be: usage of -55 tag --- ...post-01-update_taxes_based_on_templates.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index ffbab844583e..af6781cb0443 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -1182,7 +1182,7 @@ "attn_VAT-IN-V81-21-EU-C2": { "invoice": { "base": ["+81", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-81", "-86"], @@ -1207,7 +1207,7 @@ "attn_VAT-IN-V81-12-EU-C2": { "invoice": { "base": ["+81", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-81", "-86"], @@ -1233,7 +1233,7 @@ "attn_VAT-IN-V81-06-EU-C2": { "invoice": { "base": ["+81", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-81", "-86"], @@ -1269,7 +1269,7 @@ "attn_VAT-IN-V82-21-EU-S-C2": { "invoice": { "base": ["+82", "+88"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-88"], @@ -1294,7 +1294,7 @@ "attn_VAT-IN-V82-21-EU-G-C2": { "invoice": { "base": ["+82", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-86"], @@ -1319,7 +1319,7 @@ "attn_VAT-IN-V82-12-EU-S-C2": { "invoice": { "base": ["+82", "+88"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-88"], @@ -1344,7 +1344,7 @@ "attn_VAT-IN-V82-12-EU-G-C2": { "invoice": { "base": ["+82", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-86"], @@ -1369,7 +1369,7 @@ "attn_VAT-IN-V82-06-EU-S-C2": { "invoice": { "base": ["+82", "+88"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-88"], @@ -1394,7 +1394,7 @@ "attn_VAT-IN-V82-06-EU-G-C2": { "invoice": { "base": ["+82", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-82", "-86"], @@ -1430,7 +1430,7 @@ "attn_VAT-IN-V83-21-EU-C2": { "invoice": { "base": ["+83", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-83", "-86"], @@ -1466,7 +1466,7 @@ "attn_VAT-IN-V83-12-EU-C2": { "invoice": { "base": ["+83", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-83", "-86"], @@ -1491,7 +1491,7 @@ "attn_VAT-IN-V83-06-EU-C2": { "invoice": { "base": ["+83", "+86"], - "tax": ["+55"], + "tax": ["-55"], }, "refund": { "base": ["+84", "-83", "-86"], From 1818744c0c1960c0789636794c03a6c38c4f82d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Mon, 22 Apr 2024 20:42:27 +0200 Subject: [PATCH 14/16] [OU-IMP] l10n_be: fix tag -56 et -57 --- ...post-01-update_taxes_based_on_templates.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index af6781cb0443..b4f0df0f9f1a 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -895,7 +895,7 @@ "attn_VAT-IN-V81-21-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -921,7 +921,7 @@ "attn_VAT-IN-V81-12-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -946,7 +946,7 @@ "attn_VAT-IN-V81-06-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -982,7 +982,7 @@ "attn_VAT-IN-V82-21-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1007,7 +1007,7 @@ "attn_VAT-IN-V82-12-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1032,7 +1032,7 @@ "attn_VAT-IN-V82-06-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1068,7 +1068,7 @@ "attn_VAT-IN-V83-21-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-83", "-87"], @@ -1093,7 +1093,7 @@ "attn_VAT-IN-V83-12-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-83", "-87"], @@ -1119,7 +1119,7 @@ "attn_VAT-IN-V83-06-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+56"], + "tax": ["-56"], }, "refund": { "base": ["+85", "-83", "-87"], @@ -1527,7 +1527,7 @@ "attn_VAT-IN-V81-21-ROW-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -1552,7 +1552,7 @@ "attn_VAT-IN-V81-12-ROW-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -1577,7 +1577,7 @@ "attn_VAT-IN-V81-06-ROW-CC-C2": { "invoice": { "base": ["+81", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-81", "-87"], @@ -1613,7 +1613,7 @@ "attn_VAT-IN-V82-21-ROW-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1638,7 +1638,7 @@ "attn_VAT-IN-V82-12-ROW-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1663,7 +1663,7 @@ "attn_VAT-IN-V82-06-ROW-CC-C2": { "invoice": { "base": ["+82", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-82", "-87"], @@ -1699,7 +1699,7 @@ "attn_VAT-IN-V83-21-ROW-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-83", "-87"], @@ -1724,7 +1724,7 @@ "attn_VAT-IN-V83-12-ROW-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-83", "-87"], @@ -1749,7 +1749,7 @@ "attn_VAT-IN-V83-06-ROW-CC-C2": { "invoice": { "base": ["+83", "+87"], - "tax": ["+57"], + "tax": ["-57"], }, "refund": { "base": ["+85", "-83", "-87"], From 340e5cb8b36225f9eb8c5f72d2a0e9a2f9dc234f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 22 May 2024 12:37:33 +0200 Subject: [PATCH 15/16] [OU-FIX] l10n_be: linting --- .../13.0.2.0/post-01-update_taxes_based_on_templates.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py index b4f0df0f9f1a..60bb599ca3bd 100644 --- a/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py +++ b/addons/l10n_be/migrations/13.0.2.0/post-01-update_taxes_based_on_templates.py @@ -1797,6 +1797,7 @@ def _get_tags(env, names): tags |= tag return tags + def _repartition_lines_iter(account_tax): """Special loop over repartition lines in an account.tax""" for repartition in account_tax.invoice_repartition_line_ids: From 4f949bbfd70a95b5efd5b33fff7586a31cc9d449 Mon Sep 17 00:00:00 2001 From: hugues de keyzer Date: Mon, 20 Jan 2025 17:07:06 +0100 Subject: [PATCH 16/16] [IMP] remove obsolete ir.model.data entries remove obsolete res.country.state ir.model.data entries. --- .../13.0.2.0/openupgrade_analysis_work.txt | 172 ++++++++++++++++++ .../migrations/13.0.2.0/pre-migration.py | 26 +++ 2 files changed, 198 insertions(+) create mode 100644 addons/l10n_be/migrations/13.0.2.0/openupgrade_analysis_work.txt create mode 100644 addons/l10n_be/migrations/13.0.2.0/pre-migration.py diff --git a/addons/l10n_be/migrations/13.0.2.0/openupgrade_analysis_work.txt b/addons/l10n_be/migrations/13.0.2.0/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..4e72134ed4fe --- /dev/null +++ b/addons/l10n_be/migrations/13.0.2.0/openupgrade_analysis_work.txt @@ -0,0 +1,172 @@ +---Models in module 'l10n_be'--- +---Fields in module 'l10n_be'--- +---XML records in module 'l10n_be'--- +DEL account.account.tag: l10n_be.tax_tag_00 +DEL account.account.tag: l10n_be.tax_tag_01 +DEL account.account.tag: l10n_be.tax_tag_02 +DEL account.account.tag: l10n_be.tax_tag_03 +DEL account.account.tag: l10n_be.tax_tag_44 +DEL account.account.tag: l10n_be.tax_tag_45 +DEL account.account.tag: l10n_be.tax_tag_46L +DEL account.account.tag: l10n_be.tax_tag_46T +DEL account.account.tag: l10n_be.tax_tag_47 +DEL account.account.tag: l10n_be.tax_tag_48s44 +DEL account.account.tag: l10n_be.tax_tag_48s46L +DEL account.account.tag: l10n_be.tax_tag_48s46T +DEL account.account.tag: l10n_be.tax_tag_49 +DEL account.account.tag: l10n_be.tax_tag_54 +DEL account.account.tag: l10n_be.tax_tag_55 +DEL account.account.tag: l10n_be.tax_tag_56 +DEL account.account.tag: l10n_be.tax_tag_57 +DEL account.account.tag: l10n_be.tax_tag_59 +DEL account.account.tag: l10n_be.tax_tag_61 +DEL account.account.tag: l10n_be.tax_tag_62 +DEL account.account.tag: l10n_be.tax_tag_63 +DEL account.account.tag: l10n_be.tax_tag_64 +DEL account.account.tag: l10n_be.tax_tag_81 +DEL account.account.tag: l10n_be.tax_tag_81_not_deductible +DEL account.account.tag: l10n_be.tax_tag_82 +DEL account.account.tag: l10n_be.tax_tag_82_not_deductible +DEL account.account.tag: l10n_be.tax_tag_83 +DEL account.account.tag: l10n_be.tax_tag_83_not_deductible +DEL account.account.tag: l10n_be.tax_tag_84 +DEL account.account.tag: l10n_be.tax_tag_85 +DEL account.account.tag: l10n_be.tax_tag_85_not_deductible +DEL account.account.tag: l10n_be.tax_tag_86 +DEL account.account.tag: l10n_be.tax_tag_87 +DEL account.account.tag: l10n_be.tax_tag_88 +NEW account.account.template: l10n_be.a4001 +NEW account.account.template: l10n_be.a62021 +NEW account.account.template: l10n_be.a62022 +NEW account.account.template: l10n_be.a6231 +NEW account.account.template: l10n_be.a7492 +NEW account.fiscal.position.template: l10n_be.fiscal_position_template_5 +NEW account.reconcile.model.template: l10n_be.compte_attente_template +DEL account.tax.group: l10n_be.tax_group_tva_0_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_12_cocont (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_12_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_12_non_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_21_50_deductible (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_21_cocont (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_21_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_21_non_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_6_cocont (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_6_eu (noupdate) +DEL account.tax.group: l10n_be.tax_group_tva_6_non_eu (noupdate) +NEW account.tax.report.line: l10n_be.tax_report_line_00 +NEW account.tax.report.line: l10n_be.tax_report_line_01 +NEW account.tax.report.line: l10n_be.tax_report_line_02 +NEW account.tax.report.line: l10n_be.tax_report_line_03 +NEW account.tax.report.line: l10n_be.tax_report_line_44 +NEW account.tax.report.line: l10n_be.tax_report_line_45 +NEW account.tax.report.line: l10n_be.tax_report_line_46L +NEW account.tax.report.line: l10n_be.tax_report_line_46T +NEW account.tax.report.line: l10n_be.tax_report_line_47 +NEW account.tax.report.line: l10n_be.tax_report_line_48s44 +NEW account.tax.report.line: l10n_be.tax_report_line_48s46L +NEW account.tax.report.line: l10n_be.tax_report_line_48s46T +NEW account.tax.report.line: l10n_be.tax_report_line_49 +NEW account.tax.report.line: l10n_be.tax_report_line_54 +NEW account.tax.report.line: l10n_be.tax_report_line_55 +NEW account.tax.report.line: l10n_be.tax_report_line_56 +NEW account.tax.report.line: l10n_be.tax_report_line_57 +NEW account.tax.report.line: l10n_be.tax_report_line_59 +NEW account.tax.report.line: l10n_be.tax_report_line_61 +NEW account.tax.report.line: l10n_be.tax_report_line_62 +NEW account.tax.report.line: l10n_be.tax_report_line_63 +NEW account.tax.report.line: l10n_be.tax_report_line_64 +NEW account.tax.report.line: l10n_be.tax_report_line_71 +NEW account.tax.report.line: l10n_be.tax_report_line_72 +NEW account.tax.report.line: l10n_be.tax_report_line_81 +NEW account.tax.report.line: l10n_be.tax_report_line_82 +NEW account.tax.report.line: l10n_be.tax_report_line_83 +NEW account.tax.report.line: l10n_be.tax_report_line_84 +NEW account.tax.report.line: l10n_be.tax_report_line_85 +NEW account.tax.report.line: l10n_be.tax_report_line_86 +NEW account.tax.report.line: l10n_be.tax_report_line_87 +NEW account.tax.report.line: l10n_be.tax_report_line_88 +NEW account.tax.report.line: l10n_be.tax_report_title_operations +NEW account.tax.report.line: l10n_be.tax_report_title_operations_entree +NEW account.tax.report.line: l10n_be.tax_report_title_operations_sortie +NEW account.tax.report.line: l10n_be.tax_report_title_operations_sortie_46 +NEW account.tax.report.line: l10n_be.tax_report_title_operations_sortie_48 +NEW account.tax.report.line: l10n_be.tax_report_title_taxes +NEW account.tax.report.line: l10n_be.tax_report_title_taxes_deductibles +NEW account.tax.report.line: l10n_be.tax_report_title_taxes_dues +NEW account.tax.report.line: l10n_be.tax_report_title_taxes_soldes +DEL account.tax.template: l10n_be.attn_VAT-IN-V61 +DEL account.tax.template: l10n_be.attn_VAT-IN-V62 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-06-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-12-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V81-21-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-EU-G-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-EU-G-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-EU-S-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-EU-S-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-06-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-EU-G-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-EU-G-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-EU-S-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-EU-S-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-12-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-EU-G-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-EU-G-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-EU-S-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-EU-S-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-21-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-CAR-EXC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V82-CAR-EXC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-06-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-12-ROW-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-CC-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-EU-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-EU-C2 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-ROW-CC-C1 +DEL account.tax.template: l10n_be.attn_VAT-IN-V83-21-ROW-CC-C2 + +DEL res.country.state: l10n_be.state_be_van +DEL res.country.state: l10n_be.state_be_vbr +DEL res.country.state: l10n_be.state_be_vli +DEL res.country.state: l10n_be.state_be_vov +DEL res.country.state: l10n_be.state_be_vwv +DEL res.country.state: l10n_be.state_be_wbr +DEL res.country.state: l10n_be.state_be_wht +DEL res.country.state: l10n_be.state_be_wlg +DEL res.country.state: l10n_be.state_be_wlx +DEL res.country.state: l10n_be.state_be_wna +# DONE: pre-migration: delete ir.model.data entries diff --git a/addons/l10n_be/migrations/13.0.2.0/pre-migration.py b/addons/l10n_be/migrations/13.0.2.0/pre-migration.py new file mode 100644 index 000000000000..c8454620c881 --- /dev/null +++ b/addons/l10n_be/migrations/13.0.2.0/pre-migration.py @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from openupgradelib import openupgrade + + +def remove_res_country_state_ir_model_data(env): + """ + remove obsolete ir.model.data entries, without removing the data itself, + in case it is used. + """ + openupgrade.logged_query( + env.cr, + """ + delete from ir_model_data + where + module = 'l10n_be' and + model = 'res.country.state' + """, + ) + + +@openupgrade.migrate() +def migrate(env, version): + remove_res_country_state_ir_model_data(env)