-
Notifications
You must be signed in to change notification settings - Fork 1
[13.0][ADD] project_task_schedule #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 13.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <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 smashing it by providing a detailed and welcomed | ||
| `feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_schedule%0Aversion:%2013.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 | ||
| ~~~~~~~ | ||
|
|
||
| * Sunflower IT | ||
|
|
||
| Contributors | ||
| ~~~~~~~~~~~~ | ||
|
|
||
| * Dan Kiplangat <dan@sunflowerweb.nl> | ||
| * Tom Blauwendraat <tom@sunflowerweb.nl> | ||
|
|
||
| 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/13.0>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
|
||
| from . import models |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Copyright 2019 Sunflower IT <https://sunflowerweb.nl> | ||
| # 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)", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has some weird apostrophe flavour, did you run |
||
| "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, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
|
||
| from . import project_project | ||
| from . import project_task |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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?") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this needs a default of today, as well as end date, so that there is always a value in it after it's created for example on timeline |
||
| end_date = fields.Date("End Date") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it is two new fields, I like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. He answered |
||
|
|
||
| _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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * Dan Kiplangat <dan@sunflowerweb.nl> | ||
| * Tom Blauwendraat <tom@sunflowerweb.nl> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| This module adds start and end date to tasks for planning. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13.0.1.0.0
Internal review first, but this looks nice, I think we can directly propose it to OCA and ping Pedro; in
https://github.com/OCA/project/issues/768he is proposing to add the fields toproject_timelineinstead of a new module.