From 9f80f0f2d643b872e9100900df3ad229056f74ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ba=C3=B1=C3=B3n?= Date: Fri, 4 Apr 2025 10:42:02 +0200 Subject: [PATCH 01/10] [ADD] project_task_related: new module to add a non parent/child relation beetwen tasks TT55793 --- project_task_related/README.rst | 88 ++++ project_task_related/__init__.py | 1 + project_task_related/__manifest__.py | 18 + project_task_related/i18n/es.po | 59 +++ .../i18n/project_task_related.pot | 55 +++ project_task_related/models/__init__.py | 1 + project_task_related/models/project_task.py | 48 ++ project_task_related/pyproject.toml | 3 + project_task_related/readme/CONTRIBUTORS.md | 3 + project_task_related/readme/DESCRIPTION.md | 1 + .../static/description/icon.png | Bin 0 -> 10254 bytes .../static/description/index.html | 433 ++++++++++++++++++ project_task_related/tests/__init__.py | 1 + .../tests/test_project_task_related.py | 65 +++ .../views/project_task_views_related.xml | 132 ++++++ 15 files changed, 908 insertions(+) create mode 100644 project_task_related/README.rst create mode 100644 project_task_related/__init__.py create mode 100644 project_task_related/__manifest__.py create mode 100644 project_task_related/i18n/es.po create mode 100644 project_task_related/i18n/project_task_related.pot create mode 100644 project_task_related/models/__init__.py create mode 100644 project_task_related/models/project_task.py create mode 100644 project_task_related/pyproject.toml create mode 100644 project_task_related/readme/CONTRIBUTORS.md create mode 100644 project_task_related/readme/DESCRIPTION.md create mode 100644 project_task_related/static/description/icon.png create mode 100644 project_task_related/static/description/index.html create mode 100644 project_task_related/tests/__init__.py create mode 100644 project_task_related/tests/test_project_task_related.py create mode 100644 project_task_related/views/project_task_views_related.xml diff --git a/project_task_related/README.rst b/project_task_related/README.rst new file mode 100644 index 0000000000..482834d607 --- /dev/null +++ b/project_task_related/README.rst @@ -0,0 +1,88 @@ +==================== +Project Related Task +==================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e12b10df652cf179d678b572a63c352e808f4aed0cb78b2ecc4b5c5273b84142 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproject-lightgray.png?logo=github + :target: https://github.com/OCA/project/tree/17.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-17-0/project-17-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=17.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 `_. +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 `__: + + - 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 `__: + +|maintainer-david-banon-tecnativa| + +This module is part of the `OCA/project `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_task_related/__init__.py b/project_task_related/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/project_task_related/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_task_related/__manifest__.py b/project_task_related/__manifest__.py new file mode 100644 index 0000000000..3ccc79a117 --- /dev/null +++ b/project_task_related/__manifest__.py @@ -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": "17.0.1.0.1", + "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, +} diff --git a/project_task_related/i18n/es.po b/project_task_related/i18n/es.po new file mode 100644 index 0000000000..8ba44f9fa4 --- /dev/null +++ b/project_task_related/i18n/es.po @@ -0,0 +1,59 @@ +# 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: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" diff --git a/project_task_related/i18n/project_task_related.pot b/project_task_related/i18n/project_task_related.pot new file mode 100644 index 0000000000..7b9f14aaa7 --- /dev/null +++ b/project_task_related/i18n/project_task_related.pot @@ -0,0 +1,55 @@ +# 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" +"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: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 "" diff --git a/project_task_related/models/__init__.py b/project_task_related/models/__init__.py new file mode 100644 index 0000000000..edf2d36b9c --- /dev/null +++ b/project_task_related/models/__init__.py @@ -0,0 +1 @@ +from . import project_task diff --git a/project_task_related/models/project_task.py b/project_task_related/models/project_task.py new file mode 100644 index 0000000000..44edfd2a32 --- /dev/null +++ b/project_task_related/models/project_task.py @@ -0,0 +1,48 @@ +# Copyright 2024 Tecnativa Carolina Fernandez +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import 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: + # Clear old relations + task.forward_related_task_ids = [(6, 0, task.related_task_ids.ids)] + task.reverse_related_task_ids = [(6, 0, task.related_task_ids.ids)] diff --git a/project_task_related/pyproject.toml b/project_task_related/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/project_task_related/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/project_task_related/readme/CONTRIBUTORS.md b/project_task_related/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..4ffd547290 --- /dev/null +++ b/project_task_related/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [Tecnativa](https://www.tecnativa.com): + > - Pedro M. Baeza + > - David Bañón diff --git a/project_task_related/readme/DESCRIPTION.md b/project_task_related/readme/DESCRIPTION.md new file mode 100644 index 0000000000..a0a8353d06 --- /dev/null +++ b/project_task_related/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Adds a tab on the task view to link tasks that are related but don't have a parent/child relationship. diff --git a/project_task_related/static/description/icon.png b/project_task_related/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1dcc49c24f364e9adf0afbc6fc0bac6dbecdeb11 GIT binary patch literal 10254 zcmbt)WmufcvhH9Zc!C8B?l8#UE&&o;gF7=g3=D(IAOS+K1lK^25Zv7%L4sRw_uvvF z*qyAk?>c**=lnR&y+1yw{;I3Hy6Ua2{<d0kcR+VvBo; zA_X`>;1;xAPL9rQqFxd#f5{a^zW*uaW+r3+U{|fRunu`GZhy$X z8_|Zi{zd#vIokczl8Xh*4Wi@i0+C?Rg1AB5VOEg8B>buLFCi~r5DPd2ED7QP2>^LO zKpr7+?*I1bPaFSLLEa0l2$tj*;u8Qtc=&(RUc*VK@ zjIN{I--GfO@vl+&r^eqy_BZ3dndN_PDzMc*W^!?dIsWAWU@LBjBg6^f4F6*!-hUYh zY$Xb}gF8b0%S1Ac@c%Rs()UCiEu3v6SiFE>h_!{gBb-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v&qnlYtPHBk#X&2}r7`@K`J@^e~Qm?iRJ*tbAaZDZTmB&mWMkZp7Kj7^kth#_uX z5z>gC(8Xz|Ie(+#&wiF3;Aey|Db(R*-U)!6;l_5@u?-$>j0SgEl5+c}Lfe-$p-dFH zB_$bC<)x6#A_2Uuo8=^l1@}vK!gvbF#b&MoH8ac3xMxUz$LFb8KU(x$YhtHanM_sw zYOFMBX2iNNSe&a}!;G9nv(tsW4@%3iQcqczOCF*JOBQ@4Orw=o?_vc(9$hfO`>U6& zyY_CUa9pASiJpmv`@oR!k;&$`h8!)$uS=}d-fPddfIdMDUW@%3y1LI(1Q=e$)sz(QC*E;Nfl99YTgk+|@jl`+iF?<_D?4YqV0Zl)lO8YWC@1ZWW^mi{5ePQN<~FQ2NMG$|K{py5akJa zkezmqhN)>MGMp$7=sOo2(7ppv``dCIwf&MaQQis7S596kkiw8Do(jO?EY4iJ4Hec6 z4Hymzu`w)cI9Pbq6GPtTP)x&Lmk;FT=ZCB4>(5}c0?;2l`p&?>&<;2(P8a3lOTNP# zdEzF5qDpkRR&PZC&cS{7xD@qV;(g5X%xI?m$9Q + + + + +Project Related Task + + + + + + diff --git a/project_task_related/tests/__init__.py b/project_task_related/tests/__init__.py new file mode 100644 index 0000000000..1a252ec370 --- /dev/null +++ b/project_task_related/tests/__init__.py @@ -0,0 +1 @@ +from . import test_project_task_related diff --git a/project_task_related/tests/test_project_task_related.py b/project_task_related/tests/test_project_task_related.py new file mode 100644 index 0000000000..70f111b8db --- /dev/null +++ b/project_task_related/tests/test_project_task_related.py @@ -0,0 +1,65 @@ +from odoo.tests import tagged + +from odoo.addons.project.tests.test_project_base import TestProjectCommon + + +@tagged("post_install", "-at_install") +class TestTaskRelated(TestProjectCommon): + def test_write_relation(self): + self.task_1.write({"related_task_ids": [(4, self.task_2.id)]}) + self.assertIn( + self.task_2.id, self.task_1.related_task_ids.ids, "Forward relation Failed" + ) + self.assertIn( + self.task_1.id, self.task_2.related_task_ids.ids, "Reverse relation Failed" + ) + + def test_create_with_relation(self): + self.task_custom = ( + self.env["project.task"] + .with_context(mail_create_nolog=True) + .create( + { + "name": "Pigs ManagerTask 2", + "user_ids": self.user_projectmanager, + "project_id": self.project_pigs.id, + "related_task_ids": [(4, self.task_1.id)], + } + ) + ) + self.assertIn( + self.task_1.id, + self.task_custom.related_task_ids.ids, + "Forward relation Failed", + ) + self.assertIn( + self.task_custom.id, + self.task_1.related_task_ids.ids, + "Reverse relation Failed", + ) + + def test_remove_relation(self): + self.task_3 = ( + self.env["project.task"] + .with_context(mail_create_nolog=True) + .create( + { + "name": "Test task 3", + "user_ids": self.user_projectmanager, + "project_id": self.project_pigs.id, + } + ) + ) + + self.task_1.write({"related_task_ids": [(4, self.task_2.id)]}) + self.task_1.write({"related_task_ids": [(4, self.task_3.id)]}) + + self.task_1.write({"related_task_ids": [(3, self.task_2.id)]}) + self.assertNotIn( + self.task_2.id, self.task_1.related_task_ids.ids, "Delete relation failed" + ) + self.assertIn( + self.task_3.id, + self.task_1.related_task_ids.ids, + "Deleted unrelated pairing", + ) diff --git a/project_task_related/views/project_task_views_related.xml b/project_task_related/views/project_task_views_related.xml new file mode 100644 index 0000000000..25ea4895b1 --- /dev/null +++ b/project_task_related/views/project_task_views_related.xml @@ -0,0 +1,132 @@ + + + + project.task.form.related.tasks + project.task + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7b8aa31b2128d0e6eaabea20efd2c9bc94bfa0fd Mon Sep 17 00:00:00 2001 From: mymage Date: Sat, 5 Apr 2025 08:31:55 +0000 Subject: [PATCH 02/10] Added translation using Weblate (Italian) --- project_task_related/i18n/it.po | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 project_task_related/i18n/it.po diff --git a/project_task_related/i18n/it.po b/project_task_related/i18n/it.po new file mode 100644 index 0000000000..2862e0d3c4 --- /dev/null +++ b/project_task_related/i18n/it.po @@ -0,0 +1,58 @@ +# 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-05 11:06+0000\n" +"Last-Translator: mymage \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.2\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: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" From 093408353cb6148d5bdfdc148187e720342472fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ba=C3=B1=C3=B3n?= Date: Wed, 9 Apr 2025 17:21:05 +0200 Subject: [PATCH 03/10] [IMP] project_task_related: show only same client tasks by default TT55793 --- project_task_related/README.rst | 2 +- project_task_related/__manifest__.py | 2 +- project_task_related/i18n/es.po | 5 +++++ .../i18n/project_task_related.pot | 5 +++++ .../static/description/index.html | 2 +- .../views/project_task_views_related.xml | 18 ++++++++++++++++-- 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/project_task_related/README.rst b/project_task_related/README.rst index 482834d607..29650c48b4 100644 --- a/project_task_related/README.rst +++ b/project_task_related/README.rst @@ -7,7 +7,7 @@ Project Related Task !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e12b10df652cf179d678b572a63c352e808f4aed0cb78b2ecc4b5c5273b84142 + !! source digest: sha256:62e9aa8b21f3cb018f39f34ab5f115c687eba92593334efca0fafdefb779ab6a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/project_task_related/__manifest__.py b/project_task_related/__manifest__.py index 3ccc79a117..fe648688ce 100644 --- a/project_task_related/__manifest__.py +++ b/project_task_related/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Project Related Task", - "version": "17.0.1.0.1", + "version": "17.0.1.0.2", "category": "Project", "author": "Tecnativa," "Odoo Community Association (OCA)", "maintainers": ["david-banon-tecnativa"], diff --git a/project_task_related/i18n/es.po b/project_task_related/i18n/es.po index 8ba44f9fa4..6ff44d81a7 100644 --- a/project_task_related/i18n/es.po +++ b/project_task_related/i18n/es.po @@ -48,6 +48,11 @@ msgstr "Valoración" 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_client +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" diff --git a/project_task_related/i18n/project_task_related.pot b/project_task_related/i18n/project_task_related.pot index 7b9f14aaa7..70192fb920 100644 --- a/project_task_related/i18n/project_task_related.pot +++ b/project_task_related/i18n/project_task_related.pot @@ -44,6 +44,11 @@ msgstr "" 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" diff --git a/project_task_related/static/description/index.html b/project_task_related/static/description/index.html index dd3d83ef89..f78c591687 100644 --- a/project_task_related/static/description/index.html +++ b/project_task_related/static/description/index.html @@ -367,7 +367,7 @@

Project Related Task

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e12b10df652cf179d678b572a63c352e808f4aed0cb78b2ecc4b5c5273b84142 +!! source digest: sha256:62e9aa8b21f3cb018f39f34ab5f115c687eba92593334efca0fafdefb779ab6a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Adds a tab on the task view to link tasks that are related but don’t diff --git a/project_task_related/views/project_task_views_related.xml b/project_task_related/views/project_task_views_related.xml index 25ea4895b1..a7957a4b24 100644 --- a/project_task_related/views/project_task_views_related.xml +++ b/project_task_related/views/project_task_views_related.xml @@ -10,7 +10,7 @@ - + + project.task.search.same.customer + project.task + + + + + + + From 449b06e6b3348c7c35b4eb10792a3b72c0f63f24 Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 10 Apr 2025 15:17:10 +0000 Subject: [PATCH 04/10] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: project-17.0/project-17.0-project_task_related Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_task_related/ --- project_task_related/i18n/es.po | 2 +- project_task_related/i18n/it.po | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/project_task_related/i18n/es.po b/project_task_related/i18n/es.po index 6ff44d81a7..9878b5835f 100644 --- a/project_task_related/i18n/es.po +++ b/project_task_related/i18n/es.po @@ -49,7 +49,7 @@ 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_client +#: model_terms:ir.ui.view,arch_db:project_task_related.view_project_task_search_inherit_same_customer msgid "Same customer" msgstr "Mismo cliente" diff --git a/project_task_related/i18n/it.po b/project_task_related/i18n/it.po index 2862e0d3c4..d1e728b25e 100644 --- a/project_task_related/i18n/it.po +++ b/project_task_related/i18n/it.po @@ -47,6 +47,11 @@ msgstr "Valutazione" 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 "" + #. 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" From 6d091ff646e59be29125860abe6c60d11e66302f Mon Sep 17 00:00:00 2001 From: mymage Date: Fri, 11 Apr 2025 08:46:08 +0000 Subject: [PATCH 05/10] Translated using Weblate (Italian) Currently translated at 100.0% (9 of 9 strings) Translation: project-17.0/project-17.0-project_task_related Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_task_related/it/ --- project_task_related/i18n/it.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project_task_related/i18n/it.po b/project_task_related/i18n/it.po index d1e728b25e..13efca95be 100644 --- a/project_task_related/i18n/it.po +++ b/project_task_related/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-04-05 11:06+0000\n" +"PO-Revision-Date: 2025-04-11 10:54+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "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.2\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 @@ -50,7 +50,7 @@ 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 "" +msgstr "Stesso cliente" #. module: project_task_related #: model:ir.model.fields,field_description:project_task_related.field_project_task__forward_related_task_ids From c40121c6ae0ae67f43cc47ba3092d58e4609fc18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ba=C3=B1=C3=B3n?= Date: Fri, 27 Jun 2025 10:54:25 +0200 Subject: [PATCH 06/10] [FIX] project_task_related: Don't set current task as parent when creating new task TT56913 --- project_task_related/README.rst | 8 ++++-- project_task_related/__manifest__.py | 2 +- .../static/description/index.html | 26 ++++++++++++------- .../views/project_task_views_related.xml | 3 +-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/project_task_related/README.rst b/project_task_related/README.rst index 29650c48b4..923bf18cf2 100644 --- a/project_task_related/README.rst +++ b/project_task_related/README.rst @@ -1,3 +1,7 @@ +.. 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 ==================== @@ -7,13 +11,13 @@ Project Related Task !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:62e9aa8b21f3cb018f39f34ab5f115c687eba92593334efca0fafdefb779ab6a + !! source digest: sha256:e0c503b081ecbc8905db57600d3bfc7f28bd08e4852f3c08a84545d7b00d7454 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |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 diff --git a/project_task_related/__manifest__.py b/project_task_related/__manifest__.py index fe648688ce..3911d784bf 100644 --- a/project_task_related/__manifest__.py +++ b/project_task_related/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Project Related Task", - "version": "17.0.1.0.2", + "version": "17.0.1.0.3", "category": "Project", "author": "Tecnativa," "Odoo Community Association (OCA)", "maintainers": ["david-banon-tecnativa"], diff --git a/project_task_related/static/description/index.html b/project_task_related/static/description/index.html index f78c591687..84cf36ef9d 100644 --- a/project_task_related/static/description/index.html +++ b/project_task_related/static/description/index.html @@ -3,7 +3,7 @@ -Project Related Task +README.rst -

diff --git a/project_task_related/views/project_task_views_related.xml b/project_task_related/views/project_task_views_related.xml index a7957a4b24..6d8f8321e4 100644 --- a/project_task_related/views/project_task_views_related.xml +++ b/project_task_related/views/project_task_views_related.xml @@ -9,7 +9,7 @@ @@ -26,7 +26,6 @@ /> - Date: Fri, 23 Jan 2026 12:51:17 +0100 Subject: [PATCH 07/10] [IMP] project_task_related: pre-commit auto fixes --- project_task_related/views/project_task_views_related.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/project_task_related/views/project_task_views_related.xml b/project_task_related/views/project_task_views_related.xml index 6d8f8321e4..677a032d49 100644 --- a/project_task_related/views/project_task_views_related.xml +++ b/project_task_related/views/project_task_views_related.xml @@ -124,7 +124,6 @@ - From bfcd29c67582e694e4b1b0b5d3f677dc9be9741e Mon Sep 17 00:00:00 2001 From: cristina-hidalgo-tecnativa Date: Mon, 26 Jan 2026 10:06:35 +0100 Subject: [PATCH 08/10] [MIG] project_task_related: Migration to 18.0 --- project_task_related/README.rst | 16 ++++------- project_task_related/__manifest__.py | 2 +- project_task_related/models/project_task.py | 7 ++--- .../static/description/index.html | 28 ++++++++----------- .../views/project_task_views_related.xml | 4 +-- 5 files changed, 23 insertions(+), 34 deletions(-) diff --git a/project_task_related/README.rst b/project_task_related/README.rst index 923bf18cf2..ab525d45a2 100644 --- a/project_task_related/README.rst +++ b/project_task_related/README.rst @@ -1,7 +1,3 @@ -.. 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 ==================== @@ -17,17 +13,17 @@ Project Related Task .. |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 +.. |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%2Fproject-lightgray.png?logo=github - :target: https://github.com/OCA/project/tree/17.0/project_task_related + :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-17-0/project-17-0-project_task_related + :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=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,7 +42,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -87,6 +83,6 @@ Current `maintainer `__: |maintainer-david-banon-tecnativa| -This module is part of the `OCA/project `_ project on GitHub. +This module is part of the `OCA/project `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_task_related/__manifest__.py b/project_task_related/__manifest__.py index 3911d784bf..3fc4c2c3da 100644 --- a/project_task_related/__manifest__.py +++ b/project_task_related/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Project Related Task", - "version": "17.0.1.0.3", + "version": "18.0.1.0.0", "category": "Project", "author": "Tecnativa," "Odoo Community Association (OCA)", "maintainers": ["david-banon-tecnativa"], diff --git a/project_task_related/models/project_task.py b/project_task_related/models/project_task.py index 44edfd2a32..ede7dc81b5 100644 --- a/project_task_related/models/project_task.py +++ b/project_task_related/models/project_task.py @@ -1,7 +1,7 @@ # Copyright 2024 Tecnativa Carolina Fernandez # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import api, fields, models +from odoo import Command, api, fields, models class ProjectTask(models.Model): @@ -43,6 +43,5 @@ def _compute_related_tasks(self): def _inverse_related_tasks(self): for task in self: - # Clear old relations - task.forward_related_task_ids = [(6, 0, task.related_task_ids.ids)] - task.reverse_related_task_ids = [(6, 0, task.related_task_ids.ids)] + task.forward_related_task_ids = [Command.set(task.related_task_ids.ids)] + task.reverse_related_task_ids = [Command.set(task.related_task_ids.ids)] diff --git a/project_task_related/static/description/index.html b/project_task_related/static/description/index.html index 84cf36ef9d..d17b969381 100644 --- a/project_task_related/static/description/index.html +++ b/project_task_related/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Project Related Task -
+ -
diff --git a/project_task_related/views/project_task_views_related.xml b/project_task_related/views/project_task_views_related.xml index 677a032d49..f3c109fc33 100644 --- a/project_task_related/views/project_task_views_related.xml +++ b/project_task_related/views/project_task_views_related.xml @@ -13,7 +13,7 @@ 'default_partner_id': partner_id, 'default_milestone_id': allow_milestones and milestone_id, 'search_default_same_customer': 1}" widget="many2many" > - - + From 478f494b480d23d0d26db50579fcbe1f3ffadd91 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 27 Jan 2026 15:18:46 +0000 Subject: [PATCH 09/10] [UPD] Update project_task_related.pot --- project_task_related/i18n/project_task_related.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_task_related/i18n/project_task_related.pot b/project_task_related/i18n/project_task_related.pot index 70192fb920..51adb4a537 100644 --- a/project_task_related/i18n/project_task_related.pot +++ b/project_task_related/i18n/project_task_related.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 17.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From 488e19e784a9d3021f746842570c42cfad8220e8 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 27 Jan 2026 15:24:17 +0000 Subject: [PATCH 10/10] [BOT] post-merge updates --- README.md | 1 + project_task_related/README.rst | 8 ++++-- .../static/description/index.html | 26 ++++++++++++------- setup/_metapackage/pyproject.toml | 3 ++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 40e42e5f3e..78d6e6930b 100644 --- a/README.md +++ b/README.md @@ -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 | Shide Andrii9090 rafaelbn | 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 | david-banon-tecnativa | Project Related Task [project_task_stage_lock](project_task_stage_lock/) | 18.0.1.0.0 | DavidJForgeFlow | 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 | DavidJForgeFlow | 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 diff --git a/project_task_related/README.rst b/project_task_related/README.rst index ab525d45a2..fe5f28bb45 100644 --- a/project_task_related/README.rst +++ b/project_task_related/README.rst @@ -1,3 +1,7 @@ +.. 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 ==================== @@ -7,13 +11,13 @@ Project Related Task !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e0c503b081ecbc8905db57600d3bfc7f28bd08e4852f3c08a84545d7b00d7454 + !! 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/licence-AGPL--3-blue.png +.. |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 diff --git a/project_task_related/static/description/index.html b/project_task_related/static/description/index.html index d17b969381..beb576a57c 100644 --- a/project_task_related/static/description/index.html +++ b/project_task_related/static/description/index.html @@ -3,7 +3,7 @@ -Project Related Task +README.rst - diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index ce4257b4d3..b1e826db46 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-project" -version = "18.0.20260119.0" +version = "18.0.20260127.0" dependencies = [ "odoo-addon-project_administrator_restricted_visibility==18.0.*", "odoo-addon-project_department==18.0.*", @@ -37,6 +37,7 @@ dependencies = [ "odoo-addon-project_task_personal_stage_auto_fold==18.0.*", "odoo-addon-project_task_pull_request==18.0.*", "odoo-addon-project_task_pull_request_state==18.0.*", + "odoo-addon-project_task_related==18.0.*", "odoo-addon-project_task_stage_lock==18.0.*", "odoo-addon-project_task_stage_mgmt==18.0.*", "odoo-addon-project_task_stage_state==18.0.*",