Skip to content

Commit

Permalink
Merge PR #404 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by thomaspaulb
  • Loading branch information
OCA-git-bot committed Mar 26, 2024
2 parents 7864b45 + 322746f commit 07d98f3
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 98 deletions.
9 changes: 8 additions & 1 deletion l10n_nl_account_tax_unece/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ L10n NL Account Tax UNECE
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2f452bdc94222eaeb2effbcfb780367186621a8c43434f39a77f9131ac25065b
!! source digest: sha256:810e0998c58ce909a8ea140a0d083fa341224b3bbb8600f5d2b33b9c443a3c0e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -52,6 +52,12 @@ Usage
Changelog
=========

14.0.1.1.0
~~~~~~~~~~

* Update unece tax tags according to NLCIUS
Source: forumstandaardisatie.nl/open-standaarden/nlcius

13.0.1.0.0
~~~~~~~~~~

Expand Down Expand Up @@ -99,6 +105,7 @@ Contributors
~~~~~~~~~~~~

* Andrea Stirpe <[email protected]>
* bosd <[email protected]>

Other credits
~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion l10n_nl_account_tax_unece/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "L10n NL Account Tax UNECE",
"summary": "Auto-configure UNECE params on Dutch taxes",
"version": "14.0.1.0.0",
"version": "14.0.1.1.0",
"category": "Localization",
"author": "Onestein, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-netherlands",
Expand Down
66 changes: 33 additions & 33 deletions l10n_nl_account_tax_unece/data/account_tax_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</record>
<record id="l10n_nl.btw_6" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_9" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_21" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_overig" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand All @@ -31,15 +31,15 @@
</record>
<record id="l10n_nl.btw_6_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_9_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_21_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_overig_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand All @@ -48,27 +48,27 @@
<!--Inkoop BTW -->
<record id="l10n_nl.btw_6_buy" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_6_buy_incl" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_9_buy" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_9_buy_incl" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_21_buy" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_21_buy_incl" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_overig_buy" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand All @@ -77,15 +77,15 @@
<!--Inkoop BTW diensten -->
<record id="l10n_nl.btw_6_buy_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_9_buy_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_21_buy_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_overig_buy_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand All @@ -94,29 +94,29 @@
<!--BTW verlegd-->
<record id="l10n_nl.btw_verk_0" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_b')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_ae')" />
</record>
<record id="l10n_nl.btw_ink_0" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_b')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_ae')" />
</record>
<!-- Binnen de EU -->
<!-- BTW inkoop -->
<record id="l10n_nl.btw_I_6" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_9" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_21" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_overig" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_k')" />
</record>
<!-- BTW verkoop -->
<record id="l10n_nl.btw_X0_producten" model="account.tax.template">
Expand All @@ -134,33 +134,33 @@
<!-- BTW inkoop diensten -->
<record id="l10n_nl.btw_I_6_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_9_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_21_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_I_overig_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_k')" />
</record>
<!-- Buiten de EU -->
<!-- BTW inkoop -->
<record id="l10n_nl.btw_E1" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E1_9" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E2" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E_overig" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand All @@ -169,24 +169,24 @@
<!-- BTW Verkoop -->
<record id="l10n_nl.btw_X1" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_b')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_g')" />
</record>
<record id="l10n_nl.btw_X3" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_b')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_g')" />
</record>
<!-- BTW inkoop diensten -->
<record id="l10n_nl.btw_E1_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E1_d_9" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_aa')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E2_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_h')" />
<field name="unece_categ_id" eval="ref('account_tax_unece.tax_categ_s')" />
</record>
<record id="l10n_nl.btw_E_overig_d" model="account.tax.template">
<field name="unece_type_id" eval="ref('account_tax_unece.tax_type_vat')" />
Expand Down
38 changes: 38 additions & 0 deletions l10n_nl_account_tax_unece/migrations/14.0.1.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 2021 Bosd
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

"""
The unece tags have been set with the no update tag.
Use openupgradelib to force load the changes.
"""


import logging

from odoo import SUPERUSER_ID, api

_logger = logging.getLogger(__name__)
try:
from openupgradelib import openupgrade
except ImportError:
openupgrade = None


def set_unece_on_taxes(cr):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
for company in env["res.company"].search([]):
company._l10n_nl_set_unece_on_taxes()


def migrate(cr, version):
if openupgrade is None:
_logger.warning(
"OpenUpgradeLib is not found, can't update l10n_nl_account_tax_unece tags"
)
return
_logger.warning("OpenUpgradeLib is going to upgrade nl l10n_nl_account_tax_unece")
openupgrade.load_data(
cr, "l10n_nl_account_tax_unece", "data/account_tax_template.xml", mode="init"
)
set_unece_on_taxes(cr)
66 changes: 33 additions & 33 deletions l10n_nl_account_tax_unece/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@

MAPPING = {
"btw_0": {"categ": "tax_categ_z"},
"btw_6": {"categ": "tax_categ_aa"},
"btw_9": {"categ": "tax_categ_aa"},
"btw_21": {"categ": "tax_categ_h"},
"btw_6": {"categ": "tax_categ_s"},
"btw_9": {"categ": "tax_categ_s"},
"btw_21": {"categ": "tax_categ_s"},
"btw_overig": {"categ": "tax_categ_s"},
"btw_0_d": {"categ": "tax_categ_z"},
"btw_6_d": {"categ": "tax_categ_aa"},
"btw_9_d": {"categ": "tax_categ_aa"},
"btw_21_d": {"categ": "tax_categ_h"},
"btw_6_d": {"categ": "tax_categ_s"},
"btw_9_d": {"categ": "tax_categ_s"},
"btw_21_d": {"categ": "tax_categ_s"},
"btw_overig_d": {"categ": "tax_categ_s"},
"btw_6_buy": {"categ": "tax_categ_aa"},
"btw_6_buy_incl": {"categ": "tax_categ_aa"},
"btw_9_buy": {"categ": "tax_categ_aa"},
"btw_9_buy_incl": {"categ": "tax_categ_aa"},
"btw_21_buy": {"categ": "tax_categ_h"},
"btw_21_buy_incl": {"categ": "tax_categ_h"},
"btw_6_buy": {"categ": "tax_categ_s"},
"btw_6_buy_incl": {"categ": "tax_categ_s"},
"btw_9_buy": {"categ": "tax_categ_s"},
"btw_9_buy_incl": {"categ": "tax_categ_s"},
"btw_21_buy": {"categ": "tax_categ_s"},
"btw_21_buy_incl": {"categ": "tax_categ_s"},
"btw_overig_buy": {"categ": "tax_categ_s"},
"btw_6_buy_d": {"categ": "tax_categ_aa"},
"btw_9_buy_d": {"categ": "tax_categ_aa"},
"btw_21_buy_d": {"categ": "tax_categ_h"},
"btw_6_buy_d": {"categ": "tax_categ_s"},
"btw_9_buy_d": {"categ": "tax_categ_s"},
"btw_21_buy_d": {"categ": "tax_categ_s"},
"btw_overig_buy_d": {"categ": "tax_categ_s"},
"btw_verk_0": {"categ": "tax_categ_b"},
"btw_ink_0": {"categ": "tax_categ_b"},
"btw_I_6": {"categ": "tax_categ_aa"},
"btw_I_9": {"categ": "tax_categ_aa"},
"btw_I_21": {"categ": "tax_categ_h"},
"btw_I_overig": {"categ": "tax_categ_s"},
"btw_verk_0": {"categ": "tax_categ_ae"},
"btw_ink_0": {"categ": "tax_categ_ae"},
"btw_I_6": {"categ": "tax_categ_s"},
"btw_I_9": {"categ": "tax_categ_s"},
"btw_I_21": {"categ": "tax_categ_s"},
"btw_I_overig": {"categ": "tax_categ_k"},
"btw_X0_producten": {"categ": "tax_categ_e"},
"btw_X0_diensten": {"categ": "tax_categ_e"},
"btw_X2": {"categ": "tax_categ_e"},
"btw_I_6_d": {"categ": "tax_categ_aa"},
"btw_I_9_d": {"categ": "tax_categ_aa"},
"btw_I_21_d": {"categ": "tax_categ_h"},
"btw_I_overig_d": {"categ": "tax_categ_s"},
"btw_E1": {"categ": "tax_categ_aa"},
"btw_E1_9": {"categ": "tax_categ_aa"},
"btw_E2": {"categ": "tax_categ_h"},
"btw_I_6_d": {"categ": "tax_categ_s"},
"btw_I_9_d": {"categ": "tax_categ_s"},
"btw_I_21_d": {"categ": "tax_categ_s"},
"btw_I_overig_d": {"categ": "tax_categ_k"},
"btw_E1": {"categ": "tax_categ_s"},
"btw_E1_9": {"categ": "tax_categ_s"},
"btw_E2": {"categ": "tax_categ_s"},
"btw_E_overig": {"categ": "tax_categ_s"},
"btw_X1": {"categ": "tax_categ_b"},
"btw_X3": {"categ": "tax_categ_b"},
"btw_E1_d": {"categ": "tax_categ_aa"},
"btw_E1_d_9": {"categ": "tax_categ_aa"},
"btw_E2_d": {"categ": "tax_categ_h"},
"btw_X1": {"categ": "tax_categ_g"},
"btw_X3": {"categ": "tax_categ_g"},
"btw_E1_d": {"categ": "tax_categ_s"},
"btw_E1_d_9": {"categ": "tax_categ_s"},
"btw_E2_d": {"categ": "tax_categ_s"},
"btw_E_overig_d": {"categ": "tax_categ_s"},
}

Expand Down
1 change: 1 addition & 0 deletions l10n_nl_account_tax_unece/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Andrea Stirpe <[email protected]>
* bosd <[email protected]>
6 changes: 6 additions & 0 deletions l10n_nl_account_tax_unece/readme/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
14.0.1.1.0
~~~~~~~~~~

* Update unece tax tags according to NLCIUS
Source: forumstandaardisatie.nl/open-standaarden/nlcius

13.0.1.0.0
~~~~~~~~~~

Expand Down
Loading

0 comments on commit 07d98f3

Please sign in to comment.