Skip to content

Commit 2d04e33

Browse files
[MIG] account_chart_update_l10n_eu_oss: Migration to 16.0
1 parent 2fc205a commit 2d04e33

File tree

6 files changed

+91
-9
lines changed

6 files changed

+91
-9
lines changed

account_chart_update_l10n_eu_oss/README.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=========================
2-
Account Chart update OSS
2+
Account Chart update OSS
33
=========================
44

55
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -14,16 +14,16 @@ Account Chart update OSS
1414
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1515
:alt: License: AGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
17-
:target: https://github.com/OCA/account-financial-tools/tree/15.0/account_chart_update_l10n_eu_oss
17+
:target: https://github.com/OCA/account-financial-tools/tree/16.0/account_chart_update_l10n_eu_oss
1818
:alt: OCA/account-financial-tools
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
2020
:target: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_chart_update_l10n_eu_oss
2121
:alt: Translate me on Weblate
2222
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/92/15.0
23+
:target: https://runbot.odoo-community.org/runbot/92/16.0
2424
:alt: Try me on Runbot
2525

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
2727

2828
Glue module for account chart update and OSS. It makes the wizard ignore OSS
2929
taxes when updating the CoA.
@@ -39,7 +39,7 @@ Bug Tracker
3939
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/issues>`_.
4040
In case of trouble, please check there if your issue has already been reported.
4141
If you spotted it first, help us smashing it by providing a detailed and welcomed
42-
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_chart_update_l10n_eu_oss%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
42+
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_chart_update_l10n_eu_oss%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4343

4444
Do not contact contributors directly about support or help with technical issues.
4545

@@ -55,6 +55,9 @@ Contributors
5555
~~~~~~~~~~~~
5656

5757
* Lois Rilo <[email protected]>
58+
* `Factor Libre <https://factorlibre.com>`_:
59+
60+
* Luis J. Salvatierra
5861

5962
Maintainers
6063
~~~~~~~~~~~
@@ -75,8 +78,8 @@ promote its widespread use.
7578

7679
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
7780

78-
|maintainer-LoisRForgeFlow|
81+
|maintainer-LoisRForgeFlow|
7982

80-
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/15.0/account_chart_update_l10n_eu_oss>`_ project on GitHub.
83+
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/16.0/account_chart_update_l10n_eu_oss>`_ project on GitHub.
8184

8285
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

account_chart_update_l10n_eu_oss/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "Account Chart update OSS ",
6-
"version": "15.0.1.0.0",
6+
"version": "16.0.1.0.0",
77
"author": "ForgeFlow, Odoo Community Association (OCA)",
88
"maintainers": ["LoisRForgeFlow"],
99
"website": "https://github.com/OCA/account-financial-tools",

account_chart_update_l10n_eu_oss/i18n/account_chart_update_l10n_eu_oss.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 15.0\n"
7+
"Project-Id-Version: Odoo Server 16.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"Last-Translator: \n"
1010
"Language-Team: \n"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
* Lois Rilo <[email protected]>
2+
* `Factor Libre <https://factorlibre.com>`_:
3+
4+
* Luis J. Salvatierra
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import test_account_chart_update_l10n_eu_oss
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
from odoo.tests import tagged
2+
3+
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
4+
5+
6+
@tagged("post_install", "post_install_l10n", "-at_install")
7+
class OssTemplateTestCase(AccountTestInvoicingCommon):
8+
9+
# pylint: disable=W8110
10+
@classmethod
11+
def load_specific_chart_template(cls, chart_template_ref):
12+
try:
13+
super().setUpClass(chart_template_ref=chart_template_ref)
14+
except ValueError as e:
15+
error_msg = f"External ID not found in the system: {chart_template_ref}"
16+
if e.args[0] == error_msg:
17+
cls.skipTest(
18+
cls,
19+
reason=f"The {chart_template_ref} CoA is required for this "
20+
"testSuite but the corresponding localization module"
21+
" isn't installed",
22+
)
23+
else:
24+
raise e
25+
26+
27+
@tagged("post_install", "post_install_l10n", "-at_install")
28+
class TestOSSSpain(OssTemplateTestCase):
29+
30+
# pylint: disable=W8106
31+
@classmethod
32+
def setUpClass(cls, chart_template_ref="l10n_es.account_chart_template_common"):
33+
cls.load_specific_chart_template(chart_template_ref)
34+
cls.chart_template = cls.env.ref(chart_template_ref)
35+
cls.env = cls.env(
36+
context=dict(
37+
cls.env.context,
38+
mail_create_nolog=True,
39+
mail_create_nosubscribe=True,
40+
mail_notrack=True,
41+
no_reset_password=True,
42+
tracking_disable=True,
43+
)
44+
)
45+
cls.company_data["company"].country_id = cls.env.ref("base.es")
46+
# Creation of OSS tax groups, among other things
47+
cls.company_data["company"]._map_eu_taxes()
48+
cls.company = cls.company_data["company"]
49+
50+
def setUp(self):
51+
super().setUp()
52+
self.wizard_obj = self.env["wizard.update.charts.accounts"]
53+
self.wizard_vals = {
54+
"company_id": self.company.id,
55+
"chart_template_id": self.chart_template.id,
56+
"code_digits": 6,
57+
"lang": "en_US",
58+
}
59+
60+
def test_matching(self):
61+
wizard_vals = self.wizard_vals
62+
wizard_vals.update(update_tax=True)
63+
wizard = self.wizard_obj.create(wizard_vals)
64+
wizard.action_find_records()
65+
taxes_to_delete = wizard.tax_ids.filtered(lambda x: x.type == "deleted").mapped(
66+
"update_tax_id"
67+
)
68+
oss_taxes = self.env["account.tax"].search(
69+
[
70+
("tax_group_id.name", "like", "OSS%%"),
71+
]
72+
)
73+
self.assertTrue(oss_taxes, "No OSS taxes found in the system")
74+
for tax in oss_taxes:
75+
self.assertNotIn(tax, taxes_to_delete)

0 commit comments

Comments
 (0)