From 8c3323d3e503c3f1302c9902ba612174ae5f38e6 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 24 May 2021 13:43:30 +0200 Subject: [PATCH] [MIG] account_tax_template: Migration to 14.0 Co-Authored-By: Jean-Charles Drubay --- account_template_active/README.rst | 119 ++++++++++++++++++ account_template_active/__manifest__.py | 4 +- .../readme/CONTRIBUTORS.rst | 1 + account_template_active/readme/USAGE.rst | 5 - .../views/view_account_account_template.xml | 9 +- .../view_account_fiscal_position_template.xml | 2 +- .../views/view_account_tax_template.xml | 10 +- 7 files changed, 138 insertions(+), 12 deletions(-) diff --git a/account_template_active/README.rst b/account_template_active/README.rst index dfbf7e40..42115380 100644 --- a/account_template_active/README.rst +++ b/account_template_active/README.rst @@ -6,3 +6,122 @@ Disable Account Template Items !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :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/14.0/account_template_active + :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-14-0/account-financial-tools-14-0-account_template_active + :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/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to disable account template items, adding +an ``active`` field on the following models: + +* ``account.account.template`` + +.. figure:: https://raw.githubusercontent.com/OCA/account-financial-tools/14.0/account_template_active/static/description/account_account_template_tree.png + +* ``account.fiscal.position.template`` and it two related models + * ``account.fiscal.position.account.template`` + * ``account.fiscal.position.tax.template`` + +.. figure:: https://raw.githubusercontent.com/OCA/account-financial-tools/14.0/account_template_active/static/description/account_fiscal_position_template_form.png + +This module can be interesting in a multi company context, +if you install a lot of accounting templates, with some changes. + +It can also be interesting if you want to developp a custom localization +module based on the official one, but with some removed / added / altered items. + +**Note:** + +* The field ``active`` is present in the Odoo ``account`` module for the model + ``account.tax.template``. for that field, this module only adds the ``active`` + field on the tree view. + +.. figure:: https://raw.githubusercontent.com/OCA/account-financial-tools/14.0/account_template_active/static/description/account_tax_template_tree.png + +For consistency reason, + +* if user disables an ``account.account.template`` it will disable the related + ``account.fiscal.position.account.template`` + +* if user disables an ``account.tax.template`` it will disable the related + ``account.fiscal.position.tax.template`` + +* if user enables an ``account.fiscal.position.account.template`` it will enable the + related ``account.account.template`` + +* if user enables an ``account.fiscal.position.tax.template`` it will enable the + related ``account.tax.template`` + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +* Go to Configuration > Templates +* Select then the template you want to change. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* GRAP + +Contributors +~~~~~~~~~~~~ + +* Sylvain LE GAL +* Stefan Rijnhart + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +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_template_active/__manifest__.py b/account_template_active/__manifest__.py index 726d9ced..4d8d72c4 100644 --- a/account_template_active/__manifest__.py +++ b/account_template_active/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Disable Account Template Items", - "version": "12.0.1.0.0", + "version": "14.0.1.0.0", "category": "Accounting", "license": "AGPL-3", "summary": "Allow to disable / enable account template items" @@ -13,7 +13,7 @@ "maintainers": ["legalsylvain"], "website": "https://github.com/OCA/account-financial-tools", "depends": [ - "account", + "account_menu", ], "data": [ "views/view_account_account_template.xml", diff --git a/account_template_active/readme/CONTRIBUTORS.rst b/account_template_active/readme/CONTRIBUTORS.rst index 9f76a75b..5e80541d 100644 --- a/account_template_active/readme/CONTRIBUTORS.rst +++ b/account_template_active/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Sylvain LE GAL +* Stefan Rijnhart diff --git a/account_template_active/readme/USAGE.rst b/account_template_active/readme/USAGE.rst index 131e7034..eac174b4 100644 --- a/account_template_active/readme/USAGE.rst +++ b/account_template_active/readme/USAGE.rst @@ -1,7 +1,2 @@ * Go to Configuration > Templates * Select then the template you want to change. - -**Note:** - -You could need the OCA module ``account_menu`` (same repository) to -access to some of the items. diff --git a/account_template_active/views/view_account_account_template.xml b/account_template_active/views/view_account_account_template.xml index 1daeebb7..d6813348 100644 --- a/account_template_active/views/view_account_account_template.xml +++ b/account_template_active/views/view_account_account_template.xml @@ -15,12 +15,12 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). not active - + - + account.account.template @@ -30,7 +30,10 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - + {"active_test": False} diff --git a/account_template_active/views/view_account_fiscal_position_template.xml b/account_template_active/views/view_account_fiscal_position_template.xml index edcf408e..48bd9bfe 100644 --- a/account_template_active/views/view_account_fiscal_position_template.xml +++ b/account_template_active/views/view_account_fiscal_position_template.xml @@ -58,7 +58,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). {"active_test": False} diff --git a/account_template_active/views/view_account_tax_template.xml b/account_template_active/views/view_account_tax_template.xml index 8f4464be..c6f78ea9 100644 --- a/account_template_active/views/view_account_tax_template.xml +++ b/account_template_active/views/view_account_tax_template.xml @@ -18,7 +18,15 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - + + account.tax.template + + + + + + + {"active_test": False}