diff --git a/account_chart_update/README.rst b/account_chart_update/README.rst index c64ce7a57..41d94ddc1 100644 --- a/account_chart_update/README.rst +++ b/account_chart_update/README.rst @@ -14,13 +14,13 @@ Detect changes and update the Account Chart from a template :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-tools/tree/11.0/account_chart_update + :target: https://github.com/OCA/account-financial-tools/tree/12.0/account_chart_update :alt: OCA/account-financial-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_chart_update + :target: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_chart_update :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/92/11.0 + :target: https://runbot.odoo-community.org/runbot/92/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,7 +46,7 @@ The wizard: Usage ===== -The wizard, accesible from *Accounting > Settings > Update chart of accounts*, +The wizard, accesible from *Accounting > Settings > Update Chart Template*, lets the user select what kind of objects must be checked/updated, and whether old records must be checked for changes and updates. @@ -69,7 +69,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -86,8 +86,12 @@ Authors Contributors ~~~~~~~~~~~~ -* Pedro M. Baeza -* Jairo Llopis +* `Tecnativa `_: + + * Pedro M. Baeza + * Jairo Llopis + * Ernesto Tejeda + * Jacques-Etienne Baudoux * Sylvain Van Hoof * Nacho Muñoz @@ -106,6 +110,6 @@ 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. -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +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/__manifest__.py b/account_chart_update/__manifest__.py index 4f15d87c7..36bc4ab28 100644 --- a/account_chart_update/__manifest__.py +++ b/account_chart_update/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Jairo Llopis # Copyright 2016 Jacques-Etienne Baudoux # Copyright 2016 Sylvain Van Hoof @@ -6,21 +5,20 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': "Detect changes and update the Account Chart from a template", + "name": "Detect changes and update the Account Chart from a template", "summary": "Wizard to update a company's account chart from a template", - 'version': "11.0.2.1.0", - 'author': "Tecnativa, " + "version": "12.0.1.0.0", + "author": "Tecnativa, " "BCIM, " "Okia, " "Odoo Community Association (OCA)", - 'website': "http://github.com/OCA/account-financial-tools", - 'depends': ["account"], - 'development_status': 'Mature', - 'category': "Accounting", - 'license': "AGPL-3", + "website": "http://github.com/OCA/account-financial-tools", + "depends": ["account"], + "category": "Accounting", + "license": "AGPL-3", "data": [ - 'wizard/wizard_chart_update_view.xml', - 'views/account_config_settings_view.xml', + "wizard/wizard_chart_update_view.xml", + "views/account_config_settings_view.xml", ], - 'installable': True, + "installable": True, } diff --git a/account_chart_update/models/__init__.py b/account_chart_update/models/__init__.py index 66c44ea1a..77308f317 100644 --- a/account_chart_update/models/__init__.py +++ b/account_chart_update/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ir_model_fields diff --git a/account_chart_update/models/ir_model_fields.py b/account_chart_update/models/ir_model_fields.py index 54aa76646..f444de17f 100644 --- a/account_chart_update/models/ir_model_fields.py +++ b/account_chart_update/models/ir_model_fields.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/account_chart_update/readme/CONTRIBUTORS.rst b/account_chart_update/readme/CONTRIBUTORS.rst index d5396d280..455609f97 100644 --- a/account_chart_update/readme/CONTRIBUTORS.rst +++ b/account_chart_update/readme/CONTRIBUTORS.rst @@ -1,5 +1,9 @@ -* Pedro M. Baeza -* Jairo Llopis +* `Tecnativa `_: + + * Pedro M. Baeza + * Jairo Llopis + * Ernesto Tejeda + * Jacques-Etienne Baudoux * Sylvain Van Hoof * Nacho Muñoz diff --git a/account_chart_update/readme/USAGE.rst b/account_chart_update/readme/USAGE.rst index 011aafa72..f08aabe42 100644 --- a/account_chart_update/readme/USAGE.rst +++ b/account_chart_update/readme/USAGE.rst @@ -1,4 +1,4 @@ -The wizard, accesible from *Accounting > Settings > Update chart of accounts*, +The wizard, accesible from *Accounting > Settings > Update Chart Template*, lets the user select what kind of objects must be checked/updated, and whether old records must be checked for changes and updates. diff --git a/account_chart_update/static/description/index.html b/account_chart_update/static/description/index.html index 3f777fe21..2de726fd5 100644 --- a/account_chart_update/static/description/index.html +++ b/account_chart_update/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Mature License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Mature License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

This is a pretty useful tool to update Odoo installations after tax reforms on the official charts of accounts, or to apply fixes performed on the chart template.

@@ -396,7 +396,7 @@ positions that got modified on the template.

Usage

-

The wizard, accesible from Accounting > Settings > Update chart of accounts, +

The wizard, accesible from Accounting > Settings > Update Chart Template, lets the user select what kind of objects must be checked/updated, and whether old records must be checked for changes and updates.

It will display all the objects to be created / updated / deactivated with some @@ -418,7 +418,7 @@ deactivate).

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -434,8 +434,12 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

Contributors

diff --git a/account_chart_update/tests/__init__.py b/account_chart_update/tests/__init__.py index 243c1b0ff..0120c73b2 100644 --- a/account_chart_update/tests/__init__.py +++ b/account_chart_update/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_account_chart_update diff --git a/account_chart_update/tests/test_account_chart_update.py b/account_chart_update/tests/test_account_chart_update.py index ed8628d5a..733fe156f 100644 --- a/account_chart_update/tests/test_account_chart_update.py +++ b/account_chart_update/tests/test_account_chart_update.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields @@ -67,6 +66,9 @@ class TestAccountChartUpdate(common.HttpCase): 'currency_id': self.env.ref('base.EUR').id, 'code_digits': 6, 'transfer_account_id': self.account_template.id, + 'cash_account_code_prefix': '570', + 'bank_account_code_prefix': '572', + 'transfer_account_code_prefix': '100000', }) self.account_template.chart_template_id = self.chart_template.id self.account_template_pl = self._create_account_tmpl( @@ -106,18 +108,10 @@ class TestAccountChartUpdate(common.HttpCase): 'name': 'Test account_chart_update company', 'currency_id': self.chart_template.currency_id.id, }) - # Load chart of template into company - wizard = self.env['wizard.multi.charts.accounts'].create({ - 'company_id': self.company.id, - 'chart_template_id': self.chart_template.id, - 'code_digits': self.chart_template.code_digits, - 'transfer_account_id': self.account_template.id, - 'currency_id': self.chart_template.currency_id.id, - 'bank_account_code_prefix': '572', - 'cash_account_code_prefix': '570', - }) - wizard.onchange_chart_template_id() - wizard.execute() + company_user = self.env.user.copy({'company_id': self.company.id}) + chart_by_company_user = self.chart_template.sudo(company_user) + chart_by_company_user.try_loading_for_current_company() + self.tax = self.env['account.tax'].search([ ('name', '=', self.tax_template.name), ('company_id', '=', self.company.id), @@ -310,7 +304,7 @@ class TestAccountChartUpdate(common.HttpCase): self.assertFalse(new_tax.active) wizard.unlink() # Errors on account update - self.account_template.reconcile = True + self.account_template.currency_id = self.ref('base.USD') self.env['account.move'].create({ 'name': 'Test move', 'journal_id': self.env['account.journal'].search([ @@ -323,6 +317,7 @@ class TestAccountChartUpdate(common.HttpCase): 'name': 'Test move line', 'debit': 10, 'credit': 0, + 'currency_id': self.ref('base.EUR'), }), (0, 0, { 'account_id': self.account.id, @@ -340,13 +335,13 @@ class TestAccountChartUpdate(common.HttpCase): # Errors on account update - continuing after that wizard.continue_on_errors = True wizard.action_update_records() - self.assertFalse(self.account.reconcile) + self.assertFalse(self.account.currency_id) self.assertEqual(self.tax.description, self.tax_template.description) self.assertEqual(wizard.rejected_updated_account_number, 1) self.assertEqual(wizard.updated_accounts, 0) wizard.unlink() # Errors on account_creation - self.account_template.reconcile = False + self.account_template.currency_id = False new_account_tmpl_2 = self._create_account_tmpl( 'Test account 3', '444444', self.account_type, self.chart_template, ) diff --git a/account_chart_update/views/account_config_settings_view.xml b/account_chart_update/views/account_config_settings_view.xml index 99cbe3708..99260a1e9 100644 --- a/account_chart_update/views/account_config_settings_view.xml +++ b/account_chart_update/views/account_config_settings_view.xml @@ -1,21 +1,19 @@ - - - - Open Account Chart Update Wizard + + Open Account Chart Update Wizard 2 res.config.settings - -
+

Update Chart Template

-