diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index 5aa4684b..4ac91864 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -13,6 +13,7 @@ "depends": [ "project", "project_task_date_planned", + "project_task_type", ], "installable": True, } diff --git a/Dockerfile b/Dockerfile index 8bff2227..c4c27687 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS USER odoo COPY project_task_date_planned /mnt/extra-addons/project_task_date_planned +COPY project_task_type /mnt/extra-addons/project_task_type COPY .docker_files/main /mnt/extra-addons/main COPY .docker_files/odoo.conf /etc/odoo diff --git a/project_task_type/README.md b/project_task_type/README.md new file mode 100644 index 00000000..bedd3141 --- /dev/null +++ b/project_task_type/README.md @@ -0,0 +1,17 @@ +# Project Task Type + +This module adds the field `Type` to the form view of a task. + +![Task Form](static/description/task_form.png?raw=true) + +A task type can be a scenario, a bug issue, a milestone, etc. + +## Configuration + +The task types are editable under Project / Settings / Task Types. + +![Task Type List](static/description/task_type_list.png?raw=true) + +Contributors +------------ +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/project_task_type/__init__.py b/project_task_type/__init__.py new file mode 100644 index 00000000..63bd6ae3 --- /dev/null +++ b/project_task_type/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/project_task_type/__manifest__.py b/project_task_type/__manifest__.py new file mode 100644 index 00000000..b2e07c6a --- /dev/null +++ b/project_task_type/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "Project Task Type", + "version": "16.0.1.0.0", + "author": "Numigi", + "maintainer": "Numigi", + "website": "https://bit.ly/numigi-com", + "license": "LGPL-3", + "category": "Project", + "summary": "Add a field for typing tasks.", + "depends": ["project"], + "data": [ + "views/project_task.xml", + "views/task_type.xml", + "security/ir.model.access.csv", + ], + "installable": True, +} diff --git a/project_task_type/i18n/fr.po b/project_task_type/i18n/fr.po new file mode 100644 index 00000000..083b8e73 --- /dev/null +++ b/project_task_type/i18n/fr.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_search_date_range +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-06-16 11:38-0400\n" +"PO-Revision-Date: 2022-06-16 11:45-0400\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: fr\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 2.0.6\n" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__active +msgid "Active" +msgstr "Actif" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__color +msgid "Color Index" +msgstr "Index de la couleur" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__description +msgid "Description" +msgstr "Description" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__id +msgid "ID" +msgstr "ID" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type____last_update +msgid "Last Modified on" +msgstr "Modifié le" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__write_uid +msgid "Last Updated by" +msgstr "Modifié par" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__name +msgid "Name" +msgstr "Nom" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_task_type__sequence +msgid "Sequence" +msgstr "Séquence" + +#. module: project_task_type +#: model:ir.model,name:project_task_type.model_project_task +msgid "Task" +msgstr "Tâche" + +#. module: project_task_type +#: model:ir.model,name:project_task_type.model_task_type +#: model_terms:ir.ui.view,arch_db:project_task_type.view_task_search_form_with_group_by_task_type_id +#: model_terms:ir.ui.view,arch_db:project_task_type.view_task_type_form +msgid "Task Type" +msgstr "Type de tâche" + +#. module: project_task_type +#: model:ir.actions.act_window,name:project_task_type.task_type_action +#: model:ir.ui.menu,name:project_task_type.task_type_menu +#: model_terms:ir.ui.view,arch_db:project_task_type.view_task_type_search +#: model_terms:ir.ui.view,arch_db:project_task_type.view_task_type_tree +msgid "Task Types" +msgstr "Types de tâches" + +#. module: project_task_type +#: model:ir.model.fields,field_description:project_task_type.field_project_task__task_type_id +msgid "Type" +msgstr "Type" diff --git a/project_task_type/models/__init__.py b/project_task_type/models/__init__.py new file mode 100644 index 00000000..3a20ee41 --- /dev/null +++ b/project_task_type/models/__init__.py @@ -0,0 +1,7 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import ( + project_task, + task_type, +) diff --git a/project_task_type/models/project_task.py b/project_task_type/models/project_task.py new file mode 100644 index 00000000..3dfdab0a --- /dev/null +++ b/project_task_type/models/project_task.py @@ -0,0 +1,14 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProjectTaskWithType(models.Model): + """Add the field task_type_id on tasks.""" + + _inherit = "project.task" + + task_type_id = fields.Many2one( + "task.type", "Type", ondelete="restrict", index=True, tracking=True + ) diff --git a/project_task_type/models/task_type.py b/project_task_type/models/task_type.py new file mode 100644 index 00000000..6541940b --- /dev/null +++ b/project_task_type/models/task_type.py @@ -0,0 +1,18 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class TaskType(models.Model): + + # project.task.type is already used to designate a workflow stage for a task. + _name = "task.type" + _description = "Task Type" + _order = "sequence" + + name = fields.Char(required=True, translate=True) + sequence = fields.Integer() + description = fields.Text(translate=True) + active = fields.Boolean(default=True) + color = fields.Integer(string="Color Index") diff --git a/project_task_type/security/ir.model.access.csv b/project_task_type/security/ir.model.access.csv new file mode 100644 index 00000000..32d49c34 --- /dev/null +++ b/project_task_type/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_task_type,access_task_type,model_task_type,,1,0,0,0 +access_task_type_manager,access_task_type_admin,model_task_type,project.group_project_manager,1,1,1,1 diff --git a/project_task_type/static/description/icon.png b/project_task_type/static/description/icon.png new file mode 100644 index 00000000..92a86b10 Binary files /dev/null and b/project_task_type/static/description/icon.png differ diff --git a/project_task_type/static/description/index.html b/project_task_type/static/description/index.html new file mode 100644 index 00000000..ea9f6ab4 --- /dev/null +++ b/project_task_type/static/description/index.html @@ -0,0 +1,10 @@ +
+
+

Add the field Type on tasks

+
+
+ +
+
+
+
diff --git a/project_task_type/static/description/task_form.png b/project_task_type/static/description/task_form.png new file mode 100644 index 00000000..42f51221 Binary files /dev/null and b/project_task_type/static/description/task_form.png differ diff --git a/project_task_type/static/description/task_type_list.png b/project_task_type/static/description/task_type_list.png new file mode 100644 index 00000000..13288a30 Binary files /dev/null and b/project_task_type/static/description/task_type_list.png differ diff --git a/project_task_type/views/project_task.xml b/project_task_type/views/project_task.xml new file mode 100644 index 00000000..1afb5eb4 --- /dev/null +++ b/project_task_type/views/project_task.xml @@ -0,0 +1,37 @@ + + + + + Task Form With Task Type + project.task + + + + + + + + + + Search Task By Task Type + project.task + + + + + + + + + + Group Tasks By Task Type + project.task + + + + + + + + + diff --git a/project_task_type/views/task_type.xml b/project_task_type/views/task_type.xml new file mode 100644 index 00000000..4a73df8b --- /dev/null +++ b/project_task_type/views/task_type.xml @@ -0,0 +1,51 @@ + + + + + Task Type Form + task.type + +
+ + + + + + + + +
+
+
+ + + Task Type List + task.type + + + + + + + + + + + Task Type Search + task.type + + + + + + + + + Task Types + task.type + tree,form + + + + +