diff --git a/account_chart_update/README.rst b/account_chart_update/README.rst index 265ba6bd9..ae5c02035 100644 --- a/account_chart_update/README.rst +++ b/account_chart_update/README.rst @@ -117,6 +117,20 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px + :target: https://github.com/yajo + :alt: yajo +.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px + :target: https://github.com/rafaelbn + :alt: rafaelbn +.. |maintainer-edlopen| image:: https://github.com/edlopen.png?size=40px + :target: https://github.com/edlopen + :alt: edlopen + +Current `maintainers `__: + +|maintainer-yajo| |maintainer-rafaelbn| |maintainer-edlopen| + This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_chart_update/static/description/index.html b/account_chart_update/static/description/index.html index 526ad6cf7..a2c357547 100644 --- a/account_chart_update/static/description/index.html +++ b/account_chart_update/static/description/index.html @@ -8,11 +8,10 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ +:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. -Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +274,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: gray; } /* line numbers */ +pre.code .ln { color: grey; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +300,7 @@ span.option { span.pre { white-space: pre } -span.problematic, pre.problematic { +span.problematic { color: red } span.section-subtitle { @@ -456,12 +455,12 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Maintainers

This module is maintained by the OCA.

- -Odoo Community Association - +Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

+

Current maintainers:

+

yajo rafaelbn edlopen

This module is part of the OCA/account-financial-tools project on GitHub.

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

diff --git a/account_chart_update/tests/test_account_chart_update.py b/account_chart_update/tests/test_account_chart_update.py index b3cdfe657..9812a8653 100644 --- a/account_chart_update/tests/test_account_chart_update.py +++ b/account_chart_update/tests/test_account_chart_update.py @@ -466,3 +466,33 @@ class TestAccountChartUpdate(TestAccountChartUpdateCommon): self.assertTrue(list(self.fp.get_external_id().values())[0]) self.assertEqual(fp_rec.get_external_id().get(fp_id), expected_xmlid) wizard.unlink() + + def test_01_archived_fiscal_position(self): + # Test wizard won't duplicate existing fiscal positions when archived + self.fp_template.tax_ids.tax_dest_id = self.tax_template.id + self.fp_template.tax_ids.tax_src_id = self.tax_template.id + fiscal_position = self.env["account.fiscal.position"].search( + [("name", "=", self.fp_template.name), ("company_id", "=", self.company.id)] + ) + wizard = self.wizard_obj.create(self.wizard_vals) + wizard.action_find_records() + wizard.action_update_records() + wizard.unlink() + fiscal_position.active = False + self.assertEqual( + fiscal_position.tax_ids.tax_src_id.name, self.tax_template.name + ) + self.assertEqual( + fiscal_position.tax_ids.tax_dest_id.name, self.tax_template.name + ) + wizard = self.wizard_obj.create(self.wizard_vals) + wizard.action_find_records() + wizard.action_update_records() + wizard.unlink() + self.assertTrue(fiscal_position.exists()) + self.assertEqual( + fiscal_position.tax_ids.tax_src_id.name, self.tax_template.name + ) + self.assertEqual( + fiscal_position.tax_ids.tax_dest_id.name, self.tax_template.name + ) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 6d3949247..fd3327660 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -680,7 +680,7 @@ class WizardUpdateChartsAccounts(models.TransientModel): continue criteria = (field_name, "in", field_values) - result = fp_model.search( + result = fp_model.with_context(active_test=False).search( [criteria, ("company_id", "=", self.company_id.id)], limit=1 ) if result: