From fd63ab17099b23f4a30aac11cef30eb2fa1b90d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Fri, 29 Jul 2022 18:24:13 +0200 Subject: [PATCH] [ADD] project_timebox: create addon to estimate task effort Adds fields to estimate the min and max time needed to solve a task. Task: [JOI-13](https://justodooit.fr/mail/view?model=project.task&res_id=13&access_token=cca0b860-25d1-472d-9da1-76f68b01a932) --- project_timebox/README.rst | 47 ++++++++++ project_timebox/__init__.py | 1 + project_timebox/__manifest__.py | 92 ++++++++++++++++++++ project_timebox/i18n/README | 1 + project_timebox/i18n/fr.po | 91 +++++++++++++++++++ project_timebox/models/__init__.py | 2 + project_timebox/models/project_task.py | 9 ++ project_timebox/models/timebox.py | 9 ++ project_timebox/security/ir.model.access.csv | 3 + project_timebox/views/project_task.xml | 15 ++++ project_timebox/views/timebox.xml | 23 +++++ 11 files changed, 293 insertions(+) create mode 100644 project_timebox/README.rst create mode 100644 project_timebox/__init__.py create mode 100644 project_timebox/__manifest__.py create mode 100644 project_timebox/i18n/README create mode 100644 project_timebox/i18n/fr.po create mode 100644 project_timebox/models/__init__.py create mode 100644 project_timebox/models/project_task.py create mode 100644 project_timebox/models/timebox.py create mode 100644 project_timebox/security/ir.model.access.csv create mode 100644 project_timebox/views/project_task.xml create mode 100644 project_timebox/views/timebox.xml diff --git a/project_timebox/README.rst b/project_timebox/README.rst new file mode 100644 index 0000000..23e9091 --- /dev/null +++ b/project_timebox/README.rst @@ -0,0 +1,47 @@ +=============== +project_timebox +=============== + +Add timebox field in tasks to estimate resolution effort. + +Installation +============ + +Use Odoo normal module installation procedure to install ``project_timebox``. +To configure the timeboxes, go to Project > Configuration > Timeboxes + +Known issues / Roadmap +====================== + +None yet. + +Bug Tracker +=========== + +Bugs are tracked on `our issues website `_. In case of +trouble, please check there if your issue has already been +reported. If you spotted it first, help us smashing it by providing a +detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Stéphan Sainléger (https://github.com/stephansainleger) +* Nicolas Jeudy (https://github.com/njeudy) + +Funders +------- + +The development of this module has been financially supported by: +* Elabore (https://elabore.coop) +* Mycéliandre (https://myceliandre.fr) +* Lokavaluto (https://lokavaluto.fr) + + +Maintainer +---------- + +This module is maintained by Elabore. diff --git a/project_timebox/__init__.py b/project_timebox/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/project_timebox/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_timebox/__manifest__.py b/project_timebox/__manifest__.py new file mode 100644 index 0000000..aba8751 --- /dev/null +++ b/project_timebox/__manifest__.py @@ -0,0 +1,92 @@ +# Copyright 2022 Stéphan Sainléger (Elabore) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "project_timebox", + "version": "12.0.1.0.0", + "author": "Elabore", + "website": "https://elabore.coop", + "maintainer": "Stéphan Sainléger", + "license": "AGPL-3", + "category": "Project", + "summary": "Add timebox field in tasks to estimate resolution effort.", + "description": """ + :image: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +=============== +project_timebox +=============== + +Add timebox field in tasks to estimate resolution effort. + +Installation +============ + +Use Odoo normal module installation procedure to install ``project_timebox``. +To configure the timeboxes, go to Project > Configuration > Timeboxes + +Known issues / Roadmap +====================== + +None yet. + +Bug Tracker +=========== + +Bugs are tracked on `our issues website `_. In case of +trouble, please check there if your issue has already been +reported. If you spotted it first, help us smashing it by providing a +detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Stéphan Sainléger (https://github.com/stephansainleger) +* Nicolas Jeudy (https://github.com/njeudy) + +Funders +------- + +The development of this module has been financially supported by: +* Elabore (https://elabore.coop) +* Mycéliandre (https://myceliandre.fr) +* Lokavaluto (https://lokavaluto.fr) + + +Maintainer +---------- + +This module is maintained by Elabore. + +""", + # any module necessary for this one to work correctly + "depends": [ + "base", + "project", + ], + "qweb": [ + # "static/src/xml/*.xml", + ], + "external_dependencies": { + "python": [], + }, + # always loaded + "data": [ + "security/ir.model.access.csv", + "views/project_task.xml", + "views/timebox.xml", + ], + # only loaded in demonstration mode + "demo": [], + "js": [], + "css": [], + "installable": True, + # Install this module automatically if all dependency have been previously + # and independently installed. Used for synergetic or glue modules. + "auto_install": False, + "application": False, +} \ No newline at end of file diff --git a/project_timebox/i18n/README b/project_timebox/i18n/README new file mode 100644 index 0000000..62197a1 --- /dev/null +++ b/project_timebox/i18n/README @@ -0,0 +1 @@ +This directory should contain the *.po for Odoo translation. diff --git a/project_timebox/i18n/fr.po b/project_timebox/i18n/fr.po new file mode 100644 index 0000000..2c4a9a4 --- /dev/null +++ b/project_timebox/i18n/fr.po @@ -0,0 +1,91 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_timebox +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-01 09:34+0000\n" +"PO-Revision-Date: 2022-08-01 09:34+0000\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_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_project_task__display_name +#: model:ir.model.fields,field_description:project_timebox.field_timebox__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_project_task__id +#: model:ir.model.fields,field_description:project_timebox.field_timebox__id +msgid "ID" +msgstr "" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_project_task____last_update +#: model:ir.model.fields,field_description:project_timebox.field_timebox____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__sequence +msgid "Sequence" +msgstr "Séquence" + +#. module: project_timebox +#: model:ir.model,name:project_timebox.model_project_task +msgid "Task" +msgstr "Tâche" + +#. module: project_timebox +#: model:ir.model,name:project_timebox.model_timebox +msgid "Timebox" +msgstr "Estimation" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_project_task__timebox_max_id +msgid "Timebox Max" +msgstr "Estimation haute" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_project_task__timebox_min_id +msgid "Timebox Min" +msgstr "Estimation basse" + +#. module: project_timebox +#: model:ir.actions.act_window,name:project_timebox.act_timeboxes_list +#: model:ir.ui.menu,name:project_timebox.menu_timeboxes +#: model_terms:ir.ui.view,arch_db:project_timebox.timebox_view_tree +msgid "Timeboxes" +msgstr "Estimations" + +#. module: project_timebox +#: model:ir.model.fields,field_description:project_timebox.field_timebox__name +msgid "name" +msgstr "nom" diff --git a/project_timebox/models/__init__.py b/project_timebox/models/__init__.py new file mode 100644 index 0000000..31bd870 --- /dev/null +++ b/project_timebox/models/__init__.py @@ -0,0 +1,2 @@ +from . import timebox +from . import project_task \ No newline at end of file diff --git a/project_timebox/models/project_task.py b/project_timebox/models/project_task.py new file mode 100644 index 0000000..2e4ef70 --- /dev/null +++ b/project_timebox/models/project_task.py @@ -0,0 +1,9 @@ + +from odoo import models, fields + + +class Task(models.Model): + _inherit = "project.task" + + timebox_min_id = fields.Many2one('timebox', string='Timebox Min') + timebox_max_id = fields.Many2one('timebox', string='Timebox Max') diff --git a/project_timebox/models/timebox.py b/project_timebox/models/timebox.py new file mode 100644 index 0000000..ea9b56e --- /dev/null +++ b/project_timebox/models/timebox.py @@ -0,0 +1,9 @@ +from odoo import models, fields + + +class Task(models.Model): + _name = "timebox" + _description = "Timebox" + + name = fields.Char('name', required=True) + sequence = fields.Integer() \ No newline at end of file diff --git a/project_timebox/security/ir.model.access.csv b/project_timebox/security/ir.model.access.csv new file mode 100644 index 0000000..99d79f2 --- /dev/null +++ b/project_timebox/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_timebox_user,project.timebox.user,model_timebox,,1,0,0,0 +access_timebox_manager,project.timebox.manager,model_timebox,project.group_project_manager,1,1,1,1 \ No newline at end of file diff --git a/project_timebox/views/project_task.xml b/project_timebox/views/project_task.xml new file mode 100644 index 0000000..2578364 --- /dev/null +++ b/project_timebox/views/project_task.xml @@ -0,0 +1,15 @@ + + + + project.task.form.timebox + project.task + + + + + + + + + + \ No newline at end of file diff --git a/project_timebox/views/timebox.xml b/project_timebox/views/timebox.xml new file mode 100644 index 0000000..3b00e97 --- /dev/null +++ b/project_timebox/views/timebox.xml @@ -0,0 +1,23 @@ + + + + + timebox.view.tree + timebox + + + + + + + + + + Timeboxes + timebox + tree + + + + + \ No newline at end of file