Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ addon | version | maintainers | summary
[project_task_personal_stage_auto_fold](project_task_personal_stage_auto_fold/) | 18.0.1.0.1 | <a href='https://github.com/Shide'><img src='https://github.com/Shide.png' width='32' height='32' style='border-radius:50%;' alt='Shide'/></a> <a href='https://github.com/Andrii9090'><img src='https://github.com/Andrii9090.png' width='32' height='32' style='border-radius:50%;' alt='Andrii9090'/></a> <a href='https://github.com/rafaelbn'><img src='https://github.com/rafaelbn.png' width='32' height='32' style='border-radius:50%;' alt='rafaelbn'/></a> | Moves task to the first fold personal stage when done
[project_task_pull_request](project_task_pull_request/) | 18.0.1.0.0 | | Adds a field for a PR URI to project tasks
[project_task_pull_request_state](project_task_pull_request_state/) | 18.0.1.0.0 | | Track Pull Request state in tasks
[project_task_related](project_task_related/) | 18.0.1.0.0 | <a href='https://github.com/david-banon-tecnativa'><img src='https://github.com/david-banon-tecnativa.png' width='32' height='32' style='border-radius:50%;' alt='david-banon-tecnativa'/></a> | Project Related Task
[project_task_stage_lock](project_task_stage_lock/) | 18.0.1.0.0 | <a href='https://github.com/DavidJForgeFlow'><img src='https://github.com/DavidJForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='DavidJForgeFlow'/></a> | Locks the Stages in the Kanban view of the project task to avoid modification of the stages in other projects. Also removes the default group by in the stages list view to be able to see the stages order.
[project_task_stage_mgmt](project_task_stage_mgmt/) | 18.0.1.0.0 | <a href='https://github.com/DavidJForgeFlow'><img src='https://github.com/DavidJForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='DavidJForgeFlow'/></a> | Allows to assign and create task stages on project creation wizard
[project_task_stage_state](project_task_stage_state/) | 18.0.1.0.0 | | Restore State attribute removed from Project Stages in 8.0
Expand Down
92 changes: 92 additions & 0 deletions project_task_related/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================
Project Related Task
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c8b2f28ccdf9265a66dd10cc12ad66288955ae79474a745855a2b67cde06abce
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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%2Fproject-lightgray.png?logo=github
:target: https://github.com/OCA/project/tree/18.0/project_task_related
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_task_related
: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/project&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Adds a tab on the task view to link tasks that are related but don't
have a parent/child relationship.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/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 <https://github.com/OCA/project/issues/new?body=module:%20project_task_related%0Aversion:%2018.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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- David Bañón

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-david-banon-tecnativa| image:: https://github.com/david-banon-tecnativa.png?size=40px
:target: https://github.com/david-banon-tecnativa
:alt: david-banon-tecnativa

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-david-banon-tecnativa|

This module is part of the `OCA/project <https://github.com/OCA/project/tree/18.0/project_task_related>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions project_task_related/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions project_task_related/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 Tecnativa - David Bañón

# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Project Related Task",
"version": "18.0.1.0.0",
"category": "Project",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"maintainers": ["david-banon-tecnativa"],
"website": "https://github.com/OCA/project",
"depends": [
"project",
],
"data": ["views/project_task_views_related.xml"],
"license": "AGPL-3",
"installable": True,
}
64 changes: 64 additions & 0 deletions project_task_related/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_related
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-04 09:34+0000\n"
"PO-Revision-Date: 2025-04-04 11:42+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: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.6\n"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "My Deadline"
msgstr "Mi fecha límite"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Next Activity"
msgstr "Siguiente actividad"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__reverse_related_task_ids
msgid "Other to self task relation"
msgstr "Relación entre otra y esta tarea"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Project"
msgstr "Proyecto"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Rating"
msgstr "Valoración"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__related_task_ids
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Related Tasks"
msgstr "Tareas Relacionadas"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_project_task_search_inherit_same_customer
msgid "Same customer"
msgstr "Mismo cliente"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__forward_related_task_ids
msgid "Self to other task relation"
msgstr "Relación entre esta tarea y otra"

#. module: project_task_related
#: model:ir.model,name:project_task_related.model_project_task
msgid "Task"
msgstr "Tarea"
63 changes: 63 additions & 0 deletions project_task_related/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_related
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-04-11 10:54+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "My Deadline"
msgstr "La mia scadenza"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Next Activity"
msgstr "Attività successiva"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__reverse_related_task_ids
msgid "Other to self task relation"
msgstr "Relazione oltre il proprio lavoro"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Project"
msgstr "Progetto"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Rating"
msgstr "Valutazione"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__related_task_ids
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Related Tasks"
msgstr "Lavori relativi"

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_project_task_search_inherit_same_customer
msgid "Same customer"
msgstr "Stesso cliente"

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__forward_related_task_ids
msgid "Self to other task relation"
msgstr "Relazione propria ad altri lavori"

#. module: project_task_related
#: model:ir.model,name:project_task_related.model_project_task
msgid "Task"
msgstr "Lavoro"
60 changes: 60 additions & 0 deletions project_task_related/i18n/project_task_related.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_related
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "My Deadline"
msgstr ""

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Next Activity"
msgstr ""

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__reverse_related_task_ids
msgid "Other to self task relation"
msgstr ""

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Project"
msgstr ""

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Rating"
msgstr ""

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__related_task_ids
#: model_terms:ir.ui.view,arch_db:project_task_related.view_task_form_inherit_related_tasks
msgid "Related Tasks"
msgstr ""

#. module: project_task_related
#: model_terms:ir.ui.view,arch_db:project_task_related.view_project_task_search_inherit_same_customer
msgid "Same customer"
msgstr ""

#. module: project_task_related
#: model:ir.model.fields,field_description:project_task_related.field_project_task__forward_related_task_ids
msgid "Self to other task relation"
msgstr ""

#. module: project_task_related
#: model:ir.model,name:project_task_related.model_project_task
msgid "Task"
msgstr ""
1 change: 1 addition & 0 deletions project_task_related/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_task
47 changes: 47 additions & 0 deletions project_task_related/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2024 Tecnativa Carolina Fernandez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import Command, api, fields, models


class ProjectTask(models.Model):
_inherit = "project.task"

forward_related_task_ids = fields.Many2many(
"project.task",
"project_task_relation",
"task_id",
"related_task_id",
string="Self to other task relation",
)

# Inverse relation: Task B -> Task A
reverse_related_task_ids = fields.Many2many(
"project.task",
"project_task_relation",
"related_task_id",
"task_id",
string="Other to self task relation",
)

# Displayed field: merged bidirectional field
related_task_ids = fields.Many2many(
"project.task",
compute="_compute_related_tasks",
inverse="_inverse_related_tasks",
string="Related Tasks",
domain="[('id', '!=', id)]",
)

@api.depends("forward_related_task_ids", "reverse_related_task_ids")
def _compute_related_tasks(self):
for task in self:
task.related_task_ids = task.forward_related_task_ids
task.related_task_ids += self.env["project.task"].search(
[("reverse_related_task_ids", "in", [task.id])]
)

def _inverse_related_tasks(self):
for task in self:
task.forward_related_task_ids = [Command.set(task.related_task_ids.ids)]
task.reverse_related_task_ids = [Command.set(task.related_task_ids.ids)]
3 changes: 3 additions & 0 deletions project_task_related/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions project_task_related/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):
> - Pedro M. Baeza
> - David Bañón
1 change: 1 addition & 0 deletions project_task_related/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds a tab on the task view to link tasks that are related but don't have a parent/child relationship.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading