diff --git a/hr_expense_analytic_tag/README.rst b/hr_expense_analytic_tag/README.rst deleted file mode 100644 index 370cb716f..000000000 --- a/hr_expense_analytic_tag/README.rst +++ /dev/null @@ -1,87 +0,0 @@ -======================= -Hr Expense Analytic Tag -======================= - -.. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ea4437cc02432a913a4f0008f3736ee353b6035d4590912fe5844d2b0d30bdc0 - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |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%2Fhr--expense-lightgray.png?logo=github - :target: https://github.com/OCA/hr-expense/tree/16.0/hr_expense_analytic_tag - :alt: OCA/hr-expense -.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_analytic_tag - :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=16.0 - :alt: Try me on Runboat - -|badge1| |badge2| |badge3| |badge4| |badge5| - -The module restores the possibility of defining analytical tags in expenses so that the analytical items generated have those tags. - -**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 to smash it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* Tecnativa - -Contributors -~~~~~~~~~~~~ - -* `Tecnativa `_: - - * Víctor Martínez - * Pedro M. Baeza - -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-victoralmau| image:: https://github.com/victoralmau.png?size=40px - :target: https://github.com/victoralmau - :alt: victoralmau - -Current `maintainer `__: - -|maintainer-victoralmau| - -This module is part of the `OCA/hr-expense `_ project on GitHub. - -You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_expense_analytic_tag/__init__.py b/hr_expense_analytic_tag/__init__.py deleted file mode 100644 index 0650744f6..000000000 --- a/hr_expense_analytic_tag/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import models diff --git a/hr_expense_analytic_tag/__manifest__.py b/hr_expense_analytic_tag/__manifest__.py deleted file mode 100644 index b54c6af2e..000000000 --- a/hr_expense_analytic_tag/__manifest__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2023 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -{ - "name": "Hr Expense Analytic Tag", - "version": "16.0.1.0.0", - "category": "Human Resources", - "website": "https://github.com/OCA/hr-expense", - "author": "Tecnativa, Odoo Community Association (OCA)", - "license": "AGPL-3", - "depends": ["hr_expense", "account_analytic_tag"], - "installable": True, - "auto_install": True, - "data": [ - "views/hr_expense_view.xml", - ], - "maintainers": ["victoralmau"], -} diff --git a/hr_expense_analytic_tag/i18n/es.po b/hr_expense_analytic_tag/i18n/es.po deleted file mode 100644 index 0e60d3564..000000000 --- a/hr_expense_analytic_tag/i18n/es.po +++ /dev/null @@ -1,33 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_analytic_tag -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 08:19+0000\n" -"PO-Revision-Date: 2023-10-11 10:19+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 3.0.1\n" - -#. module: hr_expense_analytic_tag -#: model:ir.model.fields,field_description:hr_expense_analytic_tag.field_hr_expense__analytic_tag_ids -msgid "Analytic Tags" -msgstr "Etiquetas analíticas" - -#. module: hr_expense_analytic_tag -#: model:ir.model,name:hr_expense_analytic_tag.model_hr_expense -msgid "Expense" -msgstr "Gasto" - -#. module: hr_expense_analytic_tag -#: model:ir.model,name:hr_expense_analytic_tag.model_account_move_line -msgid "Journal Item" -msgstr "Apunte contable" diff --git a/hr_expense_analytic_tag/i18n/hr_expense_analytic_tag.pot b/hr_expense_analytic_tag/i18n/hr_expense_analytic_tag.pot deleted file mode 100644 index 415d426a1..000000000 --- a/hr_expense_analytic_tag/i18n/hr_expense_analytic_tag.pot +++ /dev/null @@ -1,24 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_analytic_tag -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \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: hr_expense_analytic_tag -#: model:ir.model.fields,field_description:hr_expense_analytic_tag.field_hr_expense__analytic_tag_ids -msgid "Analytic Tags" -msgstr "" - -#. module: hr_expense_analytic_tag -#: model:ir.model,name:hr_expense_analytic_tag.model_hr_expense -msgid "Expense" -msgstr "" diff --git a/hr_expense_analytic_tag/models/__init__.py b/hr_expense_analytic_tag/models/__init__.py deleted file mode 100644 index ced2eb18d..000000000 --- a/hr_expense_analytic_tag/models/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from . import hr_expense diff --git a/hr_expense_analytic_tag/models/hr_expense.py b/hr_expense_analytic_tag/models/hr_expense.py deleted file mode 100644 index 9408a9a42..000000000 --- a/hr_expense_analytic_tag/models/hr_expense.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2023 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from odoo import fields, models - - -class HrExpense(models.Model): - _inherit = "hr.expense" - - analytic_tag_ids = fields.Many2many( - comodel_name="account.analytic.tag", - string="Analytic Tags", - ) - - def _prepare_move_line_vals(self): - vals = super()._prepare_move_line_vals() - if self.analytic_tag_ids: - vals.update({"analytic_tag_ids": [(6, 0, self.analytic_tag_ids.ids)]}) - return vals diff --git a/hr_expense_analytic_tag/readme/CONTRIBUTORS.rst b/hr_expense_analytic_tag/readme/CONTRIBUTORS.rst deleted file mode 100644 index 5fb713053..000000000 --- a/hr_expense_analytic_tag/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,4 +0,0 @@ -* `Tecnativa `_: - - * Víctor Martínez - * Pedro M. Baeza diff --git a/hr_expense_analytic_tag/readme/DESCRIPTION.rst b/hr_expense_analytic_tag/readme/DESCRIPTION.rst deleted file mode 100644 index 4f69dae3c..000000000 --- a/hr_expense_analytic_tag/readme/DESCRIPTION.rst +++ /dev/null @@ -1 +0,0 @@ -The module restores the possibility of defining analytical tags in expenses so that the analytical items generated have those tags. diff --git a/hr_expense_analytic_tag/static/description/icon.png b/hr_expense_analytic_tag/static/description/icon.png deleted file mode 100644 index 3a0328b51..000000000 Binary files a/hr_expense_analytic_tag/static/description/icon.png and /dev/null differ diff --git a/hr_expense_analytic_tag/static/description/index.html b/hr_expense_analytic_tag/static/description/index.html deleted file mode 100644 index 79fcf2dcf..000000000 --- a/hr_expense_analytic_tag/static/description/index.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - -Hr Expense Analytic Tag - - - -
-

Hr Expense Analytic Tag

- - -

Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

-

The module restores the possibility of defining analytical tags in expenses so that the analytical items generated have those tags.

-

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 to smash it by providing a detailed and welcomed -feedback.

-

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

-
-
-

Credits

-
-

Authors

-
    -
  • Tecnativa
  • -
-
-
-

Contributors

-
    -
  • Tecnativa:
      -
    • Víctor Martínez
    • -
    • Pedro M. Baeza
    • -
    -
  • -
-
-
-

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.

-

Current maintainer:

-

victoralmau

-

This module is part of the OCA/hr-expense project on GitHub.

-

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

-
-
-
- - diff --git a/hr_expense_analytic_tag/tests/__init__.py b/hr_expense_analytic_tag/tests/__init__.py deleted file mode 100644 index 88cc2dde8..000000000 --- a/hr_expense_analytic_tag/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright 2023 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from . import test_hr_expense_analytic_tag diff --git a/hr_expense_analytic_tag/tests/test_hr_expense_analytic_tag.py b/hr_expense_analytic_tag/tests/test_hr_expense_analytic_tag.py deleted file mode 100644 index 9df7012ef..000000000 --- a/hr_expense_analytic_tag/tests/test_hr_expense_analytic_tag.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2023 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.tests import Form, common - - -class TestHrExpenseAnalyticTag(common.TransactionCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.env = cls.env( - context=dict( - cls.env.context, - mail_create_nolog=True, - mail_create_nosubscribe=True, - mail_notrack=True, - no_reset_password=True, - tracking_disable=True, - ) - ) - address = cls.env["res.partner"].create( - {"name": "Test private address", "type": "private"} - ) - cls.employee = cls.env["hr.employee"].create( - {"name": "Test employee", "address_home_id": address.id} - ) - cls.product = cls.env["product.product"].create( - { - "name": "Test product expense", - "can_be_expensed": True, - "standard_price": 100, - } - ) - cls.plan = cls.env["account.analytic.plan"].create( - { - "name": "Projects Plan", - "company_id": False, - } - ) - cls.analytic_account_1 = cls.env["account.analytic.account"].create( - { - "name": "Test account 1", - "plan_id": cls.plan.id, - }, - ) - cls.analytic_account_2 = cls.env["account.analytic.account"].create( - { - "name": "Test account 2", - "plan_id": cls.plan.id, - }, - ) - aa_tag_model = cls.env["account.analytic.tag"] - cls.analytic_tag_1 = aa_tag_model.create({"name": "Test tag 1"}) - cls.analytic_tag_2 = aa_tag_model.create({"name": "Test tag 2"}) - cls.expense = cls._create_expense(cls) - - def _create_expense(self): - expense_form = Form( - self.env["hr.expense"].with_context( - default_product_id=self.product.id, - default_employee_id=self.employee.id, - ) - ) - expense_form.name = "Test expense" - return expense_form.save() - - def _action_submit_expenses(self, expense): - res = expense.action_submit_expenses() - sheet_form = Form(self.env[res["res_model"]].with_context(**res["context"])) - return sheet_form.save() - - def test_hr_expense_with_tag(self): - """Tag without analytic accounts.""" - self.expense.analytic_distribution = {self.analytic_account_1.id: 100} - self.expense.analytic_tag_ids = self.analytic_tag_1 - expense_sheet = self._action_submit_expenses(self.expense) - expense_sheet.approve_expense_sheets() - move = expense_sheet.action_sheet_move_create() - tags = move.mapped("line_ids.analytic_line_ids.tag_ids") - self.assertIn(self.analytic_tag_1, tags) - self.assertNotIn(self.analytic_tag_2, tags) - - def test_hr_expense_with_tags_01(self): - """Tags without analytic accounts.""" - self.expense.analytic_distribution = {self.analytic_account_1.id: 100} - self.expense.analytic_tag_ids = self.analytic_tag_1 + self.analytic_tag_2 - expense_sheet = self._action_submit_expenses(self.expense) - expense_sheet.approve_expense_sheets() - move = expense_sheet.action_sheet_move_create() - tags = move.mapped("line_ids.analytic_line_ids.tag_ids") - self.assertIn(self.analytic_tag_1, tags) - self.assertIn(self.analytic_tag_2, tags) - - def test_hr_expense_with_tags_02(self): - """Tags with analytic account and expense analytic account 1 + 2.""" - self.analytic_tag_1.account_analytic_id = self.analytic_account_1 - self.analytic_tag_2.account_analytic_id = self.analytic_account_2 - self.expense.analytic_distribution = { - self.analytic_account_1.id: 50, - self.analytic_account_2.id: 50, - } - self.expense.analytic_tag_ids = self.analytic_tag_1 + self.analytic_tag_2 - expense_sheet = self._action_submit_expenses(self.expense) - expense_sheet.approve_expense_sheets() - move = expense_sheet.action_sheet_move_create() - tags = move.mapped("line_ids.analytic_line_ids.tag_ids") - self.assertIn(self.analytic_tag_1, tags) - self.assertIn(self.analytic_tag_2, tags) - - def test_hr_expense_with_tags_03(self): - """Tags with analytic account and expense analytic account 1.""" - self.analytic_tag_1.account_analytic_id = self.analytic_account_1 - self.analytic_tag_2.account_analytic_id = self.analytic_account_2 - self.expense.analytic_distribution = { - self.analytic_account_1.id: 50, - } - self.expense.analytic_tag_ids = self.analytic_tag_1 + self.analytic_tag_2 - expense_sheet = self._action_submit_expenses(self.expense) - expense_sheet.approve_expense_sheets() - move = expense_sheet.action_sheet_move_create() - tags = move.mapped("line_ids.analytic_line_ids.tag_ids") - self.assertIn(self.analytic_tag_1, tags) - self.assertNotIn(self.analytic_tag_2, tags) - - def test_hr_expense_without_tags(self): - self.expense.analytic_distribution = {self.analytic_account_1.id: 100} - expense_sheet = self._action_submit_expenses(self.expense) - expense_sheet.approve_expense_sheets() - move = expense_sheet.action_sheet_move_create() - tags = move.mapped("line_ids.analytic_line_ids.tag_ids") - self.assertNotIn(self.analytic_tag_1, tags) - self.assertNotIn(self.analytic_tag_2, tags) diff --git a/hr_expense_analytic_tag/views/hr_expense_view.xml b/hr_expense_analytic_tag/views/hr_expense_view.xml deleted file mode 100644 index fa37f66c2..000000000 --- a/hr_expense_analytic_tag/views/hr_expense_view.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - hr.expense.view.form - hr.expense - - - - - - - - diff --git a/setup/hr_expense_analytic_tag/odoo/addons/hr_expense_analytic_tag b/setup/hr_expense_analytic_tag/odoo/addons/hr_expense_analytic_tag deleted file mode 120000 index 8437ef64b..000000000 --- a/setup/hr_expense_analytic_tag/odoo/addons/hr_expense_analytic_tag +++ /dev/null @@ -1 +0,0 @@ -../../../../hr_expense_analytic_tag \ No newline at end of file diff --git a/setup/hr_expense_analytic_tag/setup.py b/setup/hr_expense_analytic_tag/setup.py deleted file mode 100644 index 28c57bb64..000000000 --- a/setup/hr_expense_analytic_tag/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=['setuptools-odoo'], - odoo_addon=True, -)