2
0

[MIG] account_tax_template: Migration to 14.0

Co-Authored-By: Jean-Charles Drubay <jc@komit-consulting.com>
This commit is contained in:
Stefan Rijnhart 2021-05-24 13:43:30 +02:00 committed by Sylvain LE GAL
parent 4a630e320c
commit 8c3323d3e5
7 changed files with 138 additions and 12 deletions

View File

@ -6,3 +6,122 @@ Disable Account Template Items
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! 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 <https://github.com/OCA/account-financial-tools/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 <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_template_active%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* GRAP
Contributors
~~~~~~~~~~~~
* Sylvain LE GAL <https://twitter.com/legalsylvain>
* Stefan Rijnhart <stefan@opener.amsterdam>
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 <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-legalsylvain|
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/14.0/account_template_active>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -4,7 +4,7 @@
{ {
"name": "Disable Account Template Items", "name": "Disable Account Template Items",
"version": "12.0.1.0.0", "version": "14.0.1.0.0",
"category": "Accounting", "category": "Accounting",
"license": "AGPL-3", "license": "AGPL-3",
"summary": "Allow to disable / enable account template items" "summary": "Allow to disable / enable account template items"
@ -13,7 +13,7 @@
"maintainers": ["legalsylvain"], "maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/account-financial-tools", "website": "https://github.com/OCA/account-financial-tools",
"depends": [ "depends": [
"account", "account_menu",
], ],
"data": [ "data": [
"views/view_account_account_template.xml", "views/view_account_account_template.xml",

View File

@ -1 +1,2 @@
* Sylvain LE GAL <https://twitter.com/legalsylvain> * Sylvain LE GAL <https://twitter.com/legalsylvain>
* Stefan Rijnhart <stefan@opener.amsterdam>

View File

@ -1,7 +1,2 @@
* Go to Configuration > Templates * Go to Configuration > Templates
* Select then the template you want to change. * 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.

View File

@ -15,12 +15,12 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<attribute name="decoration-muted">not active</attribute> <attribute name="decoration-muted">not active</attribute>
</xpath> </xpath>
<field name="user_type_id" position="after"> <field name="user_type_id" position="after">
<field name="active" widget="boolean_toggle" /> <field name="active" />
</field> </field>
</field> </field>
</record> </record>
<record id="view_account_account_template_form" model="ir.ui.view"> <record id="view_account_template_form" model="ir.ui.view">
<field name="model">account.account.template</field> <field name="model">account.account.template</field>
<field name="inherit_id" ref="account.view_account_template_form" /> <field name="inherit_id" ref="account.view_account_template_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
@ -30,7 +30,10 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</field> </field>
</record> </record>
<record id="account.action_account_template_form" model="ir.actions.act_window"> <record
id="account_menu.account_account_template_action"
model="ir.actions.act_window"
>
<field name="context">{"active_test": False}</field> <field name="context">{"active_test": False}</field>
</record> </record>

View File

@ -58,7 +58,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record> </record>
<record <record
id="account.action_account_fiscal_position_template_form" id="account_menu.account_fiscal_position_template_action"
model="ir.actions.act_window" model="ir.actions.act_window"
> >
<field name="context">{"active_test": False}</field> <field name="context">{"active_test": False}</field>

View File

@ -18,7 +18,15 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</field> </field>
</field> </field>
</record> </record>
<record id="view_account_tax_template_form" model="ir.ui.view">
<field name="model">account.tax.template</field>
<field name="inherit_id" ref="account.view_account_tax_template_form" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="active" />
</field>
</field>
</record>
<record id="account.action_account_tax_template_form" model="ir.actions.act_window"> <record id="account.action_account_tax_template_form" model="ir.actions.act_window">
<field name="context">{"active_test": False}</field> <field name="context">{"active_test": False}</field>
</record> </record>