-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by thomaspaulb
- Loading branch information
Showing
9 changed files
with
161 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
~~~~~~~~~~ | ||
|
||
|
@@ -99,6 +105,7 @@ Contributors | |
~~~~~~~~~~~~ | ||
|
||
* Andrea Stirpe <[email protected]> | ||
* bosd <[email protected]> | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
l10n_nl_account_tax_unece/migrations/14.0.1.1.0/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* Andrea Stirpe <[email protected]> | ||
* bosd <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.