diff --git a/project_task_schedule/README.rst b/project_task_schedule/README.rst new file mode 100644 index 0000000000..9740b3776a --- /dev/null +++ b/project_task_schedule/README.rst @@ -0,0 +1,81 @@ +===================== +Project Task Schedule +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/13.0/project_task_schedule + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_task_schedule + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/140/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds start and end date to tasks for planning. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +* Go to **Project > Enable Task Planning**. +* Go to Project Tasks, and you will be required to enter start_date and end_date. + + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Sunflower IT + +Contributors +~~~~~~~~~~~~ + +* Dan Kiplangat +* Tom Blauwendraat + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_task_schedule/__init__.py b/project_task_schedule/__init__.py new file mode 100644 index 0000000000..69f7babdfb --- /dev/null +++ b/project_task_schedule/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/project_task_schedule/__manifest__.py b/project_task_schedule/__manifest__.py new file mode 100644 index 0000000000..142dbf3041 --- /dev/null +++ b/project_task_schedule/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2019 Sunflower IT +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Project Task Schedule", + "version": "13.0.1.0.1", + "category": "Project", + "author": "Sunflower IT, " "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/project", + "license": "AGPL-3", + "depends": ["project", "date_range"], + "data": [ + "views/project_project_views.xml", + "views/project_task_views.xml", + ], + "installable": True, +} diff --git a/project_task_schedule/models/__init__.py b/project_task_schedule/models/__init__.py new file mode 100644 index 0000000000..6486431ddd --- /dev/null +++ b/project_task_schedule/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import project_project +from . import project_task diff --git a/project_task_schedule/models/project_project.py b/project_task_schedule/models/project_project.py new file mode 100644 index 0000000000..bc343a8aba --- /dev/null +++ b/project_task_schedule/models/project_project.py @@ -0,0 +1,9 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProjectProject(models.Model): + _inherit = "project.project" + + enable_task_planning = fields.Boolean("Enable Task Planning?") diff --git a/project_task_schedule/models/project_task.py b/project_task_schedule/models/project_task.py new file mode 100644 index 0000000000..8ae4a3f580 --- /dev/null +++ b/project_task_schedule/models/project_task.py @@ -0,0 +1,25 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models, api + + +class ProjectTask(models.Model): + _inherit = "project.task" + + enable_task_planning = fields.Boolean( + related='project_id.enable_task_planning') + date_range_id = fields.Many2one( + comodel_name="date.range", string="Date range") + start_date = fields.Date("Start Date") + end_date = fields.Date("End Date") + + _sql_constraints = [ + ('start_end_date_check', + "CHECK ((start_date <= end_date))", + "The start date must be prior to the end date."), + ] + + @api.onchange("date_range_id") + def onchange_date_range_id(self): + self.start_date = self.date_range_id.date_start + self.end_date = self.date_range_id.date_end diff --git a/project_task_schedule/readme/CONTRIBUTORS.rst b/project_task_schedule/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..cb606ac20f --- /dev/null +++ b/project_task_schedule/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Dan Kiplangat +* Tom Blauwendraat diff --git a/project_task_schedule/readme/DESCRIPTION.rst b/project_task_schedule/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..6dbf9e5013 --- /dev/null +++ b/project_task_schedule/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds start and end date to tasks for planning. diff --git a/project_task_schedule/readme/USAGE.rst b/project_task_schedule/readme/USAGE.rst new file mode 100644 index 0000000000..6a446e490a --- /dev/null +++ b/project_task_schedule/readme/USAGE.rst @@ -0,0 +1,3 @@ +* Go to **Project > Enable Task Planning**. +* Go to Project Tasks, and you will be required to enter start_date and end_date. + diff --git a/project_task_schedule/static/description/icon.png b/project_task_schedule/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/project_task_schedule/static/description/icon.png differ diff --git a/project_task_schedule/static/description/index.html b/project_task_schedule/static/description/index.html new file mode 100644 index 0000000000..f8d37cfea8 --- /dev/null +++ b/project_task_schedule/static/description/index.html @@ -0,0 +1,432 @@ + + + + + + +Project Types + + + +
+

Project Task Schedule

+ + +

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

+

This module adds start and end date to tasks for planning.

+

Table of contents

+ +
+

Usage

+
    +
  • Go to Project > Enable Task Planning.
  • +
  • Go to Project Tasks, and you will be required to enter start_date and end_date.
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+ +
+

Contributors

+ + + +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/project_task_schedule/views/project_project_views.xml b/project_task_schedule/views/project_project_views.xml new file mode 100644 index 0000000000..96965a7842 --- /dev/null +++ b/project_task_schedule/views/project_project_views.xml @@ -0,0 +1,15 @@ + + + + project.project + + + +
+ +
+
+
+
+
diff --git a/project_task_schedule/views/project_task_views.xml b/project_task_schedule/views/project_task_views.xml new file mode 100644 index 0000000000..7938803baa --- /dev/null +++ b/project_task_schedule/views/project_task_views.xml @@ -0,0 +1,17 @@ + + + + project.task + + + + + + + + + + + + +