From 8364a46fa8be45303061e3b1d484be0226865abc Mon Sep 17 00:00:00 2001 From: hda Date: Thu, 17 Aug 2023 10:52:00 +0200 Subject: [PATCH] [16.0][ADD] account_analytic_account_tag --- account_analytic_account_tag/README.rst | 74 +++ account_analytic_account_tag/__init__.py | 1 + account_analytic_account_tag/__manifest__.py | 15 + .../i18n/account_analytic_account_tag.pot | 26 ++ account_analytic_account_tag/i18n/fr.po | 26 ++ .../models/__init__.py | 1 + .../models/account_analytic_account.py | 17 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 420 ++++++++++++++++++ .../views/account_analytic_account_views.xml | 44 ++ .../odoo/addons/account_analytic_account_tag | 1 + setup/account_analytic_account_tag/setup.py | 6 + 13 files changed, 634 insertions(+) create mode 100644 account_analytic_account_tag/README.rst create mode 100644 account_analytic_account_tag/__init__.py create mode 100644 account_analytic_account_tag/__manifest__.py create mode 100644 account_analytic_account_tag/i18n/account_analytic_account_tag.pot create mode 100644 account_analytic_account_tag/i18n/fr.po create mode 100644 account_analytic_account_tag/models/__init__.py create mode 100644 account_analytic_account_tag/models/account_analytic_account.py create mode 100644 account_analytic_account_tag/readme/CONTRIBUTORS.rst create mode 100644 account_analytic_account_tag/readme/DESCRIPTION.rst create mode 100644 account_analytic_account_tag/static/description/index.html create mode 100644 account_analytic_account_tag/views/account_analytic_account_views.xml create mode 120000 setup/account_analytic_account_tag/odoo/addons/account_analytic_account_tag create mode 100644 setup/account_analytic_account_tag/setup.py diff --git a/account_analytic_account_tag/README.rst b/account_analytic_account_tag/README.rst new file mode 100644 index 0000000000..9281890c93 --- /dev/null +++ b/account_analytic_account_tag/README.rst @@ -0,0 +1,74 @@ +============================ +Account Analytic Account Tag +============================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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--analytic-lightgray.png?logo=github + :target: https://github.com/OCA/account-analytic/tree/16.0/account_analytic_account_tag + :alt: OCA/account-analytic +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_account_tag + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-analytic&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +The goal of this module is to restore the tag_ids (analytic tag) to the +account.analytic.account model that were present until v11. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* ACSONE SA/NV + +Contributors +~~~~~~~~~~~~ + +* Hughes Damry + +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. + +This module is part of the `OCA/account-analytic `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_analytic_account_tag/__init__.py b/account_analytic_account_tag/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/account_analytic_account_tag/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_analytic_account_tag/__manifest__.py b/account_analytic_account_tag/__manifest__.py new file mode 100644 index 0000000000..c254d6d420 --- /dev/null +++ b/account_analytic_account_tag/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Account Analytic Account Tag", + "summary": """Restore the tag_ids in account.analytic.account""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-analytic", + "depends": ["account_analytic_tag"], + "data": ["views/account_analytic_account_views.xml"], + "demo": [], + "installable": True, +} diff --git a/account_analytic_account_tag/i18n/account_analytic_account_tag.pot b/account_analytic_account_tag/i18n/account_analytic_account_tag.pot new file mode 100644 index 0000000000..8613906544 --- /dev/null +++ b/account_analytic_account_tag/i18n/account_analytic_account_tag.pot @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_account_tag +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-17 08:02+0000\n" +"PO-Revision-Date: 2023-08-17 08:02+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_analytic_account_tag +#: model:ir.model,name:account_analytic_account_tag.model_account_analytic_account +msgid "Analytic Account" +msgstr "" + +#. module: account_analytic_account_tag +#: model:ir.model.fields,field_description:account_analytic_account_tag.field_account_analytic_account__tag_ids +msgid "Tags" +msgstr "" diff --git a/account_analytic_account_tag/i18n/fr.po b/account_analytic_account_tag/i18n/fr.po new file mode 100644 index 0000000000..5f54cd8940 --- /dev/null +++ b/account_analytic_account_tag/i18n/fr.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_account_tag +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-17 08:02+0000\n" +"PO-Revision-Date: 2023-08-17 08:02+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_analytic_account_tag +#: model:ir.model,name:account_analytic_account_tag.model_account_analytic_account +msgid "Analytic Account" +msgstr "Compte analytique" + +#. module: account_analytic_account_tag +#: model:ir.model.fields,field_description:account_analytic_account_tag.field_account_analytic_account__tag_ids +msgid "Tags" +msgstr "Éiquettes" diff --git a/account_analytic_account_tag/models/__init__.py b/account_analytic_account_tag/models/__init__.py new file mode 100644 index 0000000000..97bd424345 --- /dev/null +++ b/account_analytic_account_tag/models/__init__.py @@ -0,0 +1 @@ +from . import account_analytic_account diff --git a/account_analytic_account_tag/models/account_analytic_account.py b/account_analytic_account_tag/models/account_analytic_account.py new file mode 100644 index 0000000000..5e9f2103c2 --- /dev/null +++ b/account_analytic_account_tag/models/account_analytic_account.py @@ -0,0 +1,17 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountAnalyticAccount(models.Model): + _inherit = ["account.analytic.account"] + + tag_ids = fields.Many2many( + "account.analytic.tag", + "account_analytic_account_tag_rel", + "account_id", + "tag_id", + string="Tags", + copy=True, + ) diff --git a/account_analytic_account_tag/readme/CONTRIBUTORS.rst b/account_analytic_account_tag/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..abe377cff4 --- /dev/null +++ b/account_analytic_account_tag/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Hughes Damry diff --git a/account_analytic_account_tag/readme/DESCRIPTION.rst b/account_analytic_account_tag/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..41e6287bfe --- /dev/null +++ b/account_analytic_account_tag/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +The goal of this module is to restore the tag_ids (analytic tag) to the +account.analytic.account model that were present until v11. diff --git a/account_analytic_account_tag/static/description/index.html b/account_analytic_account_tag/static/description/index.html new file mode 100644 index 0000000000..0bc6c906ad --- /dev/null +++ b/account_analytic_account_tag/static/description/index.html @@ -0,0 +1,420 @@ + + + + + + +Account Analytic Account Tag + + + +
+

Account Analytic Account Tag

+ + +

Beta License: AGPL-3 OCA/account-analytic Translate me on Weblate Try me on Runboat

+

The goal of this module is to restore the tag_ids (analytic tag) to the +account.analytic.account model that were present until v11.

+

Table of contents

+ +
+

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

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

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

+

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

+
+
+
+ + diff --git a/account_analytic_account_tag/views/account_analytic_account_views.xml b/account_analytic_account_tag/views/account_analytic_account_views.xml new file mode 100644 index 0000000000..7915ddbe31 --- /dev/null +++ b/account_analytic_account_tag/views/account_analytic_account_views.xml @@ -0,0 +1,44 @@ + + + + + account.analytic.account.form (in account_analytic_account_tag) + account.analytic.account + + + + + + + + + + account.analytic.account.tree (in account_analytic_account_tag) + account.analytic.account + + + + + + + + + + account.analytic.account.search (in account_analytic_account_tag) + account.analytic.account + + + + + + + + + diff --git a/setup/account_analytic_account_tag/odoo/addons/account_analytic_account_tag b/setup/account_analytic_account_tag/odoo/addons/account_analytic_account_tag new file mode 120000 index 0000000000..af0874aa13 --- /dev/null +++ b/setup/account_analytic_account_tag/odoo/addons/account_analytic_account_tag @@ -0,0 +1 @@ +../../../../account_analytic_account_tag \ No newline at end of file diff --git a/setup/account_analytic_account_tag/setup.py b/setup/account_analytic_account_tag/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/account_analytic_account_tag/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)