Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a98e8b3
[ADD] project_duplicate_subtask
MateuGForgeFlow May 14, 2021
dc0458e
[UPD] Update project_duplicate_subtask.pot
oca-travis Jul 19, 2021
7bbaf3c
[UPD] README.rst
OCA-git-bot Jul 19, 2021
87b6349
[FIX] project_duplicate_subtask version
gurneyalex Sep 13, 2021
05adecc
[MIG] project_duplicate_subtask: Migration to 14.0
mariadforgeflow Dec 10, 2021
5c68e7a
[UPD] Update project_duplicate_subtask.pot
oca-travis Dec 13, 2021
3116f6a
[UPD] README.rst
OCA-git-bot Dec 13, 2021
2b09ef1
[MIG] project_duplicate_subtask: Migration to 15.0
mariadforgeflow Dec 14, 2021
d6c35e3
[UPD] Update project_duplicate_subtask.pot
Jul 6, 2022
f609dca
[UPD] README.rst
OCA-git-bot Jul 6, 2022
47ba1c0
[MIG] project_duplicate_subtask: Migration to 16.0
kalpeshgajera-uncannycs Nov 2, 2022
ca6ad6c
[UPD] Update project_duplicate_subtask.pot
Jul 24, 2023
efaeb89
[UPD] README.rst
OCA-git-bot Jul 24, 2023
395b96b
Added translation using Weblate (Italian)
mymage Jul 31, 2023
c28b7f7
Translated using Weblate (Italian)
mymage Jul 31, 2023
3a3b881
[UPD] README.rst
OCA-git-bot Sep 3, 2023
f09eb73
Added translation using Weblate (Spanish)
Ivorra78 Sep 7, 2023
10f1ea4
Translated using Weblate (Spanish)
Ivorra78 Sep 7, 2023
7182684
Added translation using Weblate (Portuguese (Brazil))
adrianojprado Oct 4, 2023
67cdfe5
Translated using Weblate (Portuguese (Brazil))
adrianojprado Oct 4, 2023
3adfb78
Added translation using Weblate (Croatian)
badbole Jun 18, 2024
0d8bffa
Translated using Weblate (Croatian)
badbole Jun 18, 2024
2d0cb1e
Added translation using Weblate (Portuguese)
peterromao Feb 7, 2025
2c0d9c2
Translated using Weblate (Portuguese)
peterromao Feb 7, 2025
1d5859b
Added translation using Weblate (Galician)
pcastelovigo May 23, 2026
0aefd3d
Translated using Weblate (Galician)
pcastelovigo May 23, 2026
50ab222
[MIG] project_duplicate_subtask: Migration to 18.0
miquelrosell99 Jul 14, 2026
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
87 changes: 87 additions & 0 deletions project_duplicate_subtask/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=========================
Project Duplicate subtask
=========================

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

.. |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/18.0/project_duplicate_subtask
: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_duplicate_subtask
: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|

This module adds a server action that allows to duplicate a task with
its child tasks.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, there are two ways:

1. Go to a task: Action > Duplicate with subtasks.
2. Go to the tasks list view, select the tasks you want to duplicate:
Action > Duplicate with subtasks.

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_duplicate_subtask%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
-------

* Forgeflow

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

- Mateu Griful <mateu.griful@forgeflow.com>
- Lois Rilo <lois.rilo@forgeflow.com>

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/project <https://github.com/OCA/project/tree/18.0/project_duplicate_subtask>`_ 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_duplicate_subtask/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions project_duplicate_subtask/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2022 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

{
"name": "Project Duplicate subtask",
"version": "18.0.1.0.0",
"category": "Project",
"website": "https://github.com/OCA/project",
"summary": "The module adds an action to duplicate tasks with the child subtasks",
"author": "Forgeflow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["project"],
"data": ["views/project_duplicate_action.xml"],
"installable": True,
"auto_install": False,
}
27 changes: 27 additions & 0 deletions project_duplicate_subtask/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-07 16:36+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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 4.17\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Duplicar con subtareas"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Tarea"
27 changes: 27 additions & 0 deletions project_duplicate_subtask/i18n/gl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-05-23 18:47+0000\n"
"Last-Translator: Pablo Castelo <pablocv@gmx.es>\n"
"Language-Team: none\n"
"Language: gl\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.15.2\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Duplicar con subtareas"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Tarefa"
28 changes: 28 additions & 0 deletions project_duplicate_subtask/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-06-18 11:59+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.17\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Dupliciraj sa podzadacima"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Zadatak"
27 changes: 27 additions & 0 deletions project_duplicate_subtask/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-31 10:11+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 4.17\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Duplica con sottolavori"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Lavoro"
24 changes: 24 additions & 0 deletions project_duplicate_subtask/i18n/project_duplicate_subtask.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
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: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr ""

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr ""
27 changes: 27 additions & 0 deletions project_duplicate_subtask/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-02-07 18:26+0000\n"
"Last-Translator: Peter Romão <peterromao@yahoo.co.uk>\n"
"Language-Team: none\n"
"Language: pt\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.6.2\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Duplicar com subtarefas"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Tarefa"
27 changes: 27 additions & 0 deletions project_duplicate_subtask/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_duplicate_subtask
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-09 02:52+0000\n"
"Last-Translator: Adriano Prado <adrianojprado@gmail.com>\n"
"Language-Team: none\n"
"Language: pt_BR\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 4.17\n"

#. module: project_duplicate_subtask
#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks
msgid "Duplicate with subtasks"
msgstr "Duplicar com Subtarefas"

#. module: project_duplicate_subtask
#: model:ir.model,name:project_duplicate_subtask.model_project_task
msgid "Task"
msgstr "Tarefa"
1 change: 1 addition & 0 deletions project_duplicate_subtask/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_task
39 changes: 39 additions & 0 deletions project_duplicate_subtask/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) 2022 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from odoo import models


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

def action_duplicate_subtasks(self):
action = self.env.ref("project.action_view_task")
result = action.read()[0]
task_created = self.env["project.task"]
for task in self:
new_task = task.copy()
task_created |= new_task
if task.child_ids:

def duplicate_childs(task, new_task):
if task.child_ids:
for child in task.child_ids:
new_subtask = child.copy()
new_subtask.write({"parent_id": new_task.id})
duplicate_childs(child, new_subtask)

duplicate_childs(task, new_task)

if len(task_created) == 1:
res = self.env.ref("project.view_task_form2")
result["views"] = [(res and res.id or False, "form")]
result["res_id"] = new_task.id
action["context"] = {
"form_view_initial_mode": "edit",
"force_detailed_view": "true",
}

else:
result["domain"] = "[('id', 'in', " + str(task_created.ids) + ")]"
return result
3 changes: 3 additions & 0 deletions project_duplicate_subtask/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions project_duplicate_subtask/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Mateu Griful \<<mateu.griful@forgeflow.com>\>
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
2 changes: 2 additions & 0 deletions project_duplicate_subtask/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module adds a server action that allows to duplicate a task with its
child tasks.
5 changes: 5 additions & 0 deletions project_duplicate_subtask/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To use this module, there are two ways:

1. Go to a task: Action \> Duplicate with subtasks.
2. Go to the tasks list view, select the tasks you want to duplicate:
Action \> Duplicate with subtasks.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading