diff --git a/project_timeline/README.rst b/project_timeline/README.rst index b50da8536a..f909e89c39 100644 --- a/project_timeline/README.rst +++ b/project_timeline/README.rst @@ -79,6 +79,7 @@ Contributors * Pedro M. Baeza * Carlos Dauden * Alexandre Díaz + * Juan José Seguí * `Open Source Integrators `_: diff --git a/project_timeline/__init__.py b/project_timeline/__init__.py index adb73323b1..83e553ac46 100644 --- a/project_timeline/__init__.py +++ b/project_timeline/__init__.py @@ -1,4 +1,3 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from .hooks import populate_date_start from . import models diff --git a/project_timeline/__manifest__.py b/project_timeline/__manifest__.py index 77c3a2ff51..dddc413b9a 100644 --- a/project_timeline/__manifest__.py +++ b/project_timeline/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Project timeline", "summary": "Timeline view for projects", - "version": "14.0.1.5.0", + "version": "14.0.1.5.1", "category": "Project Management", "website": "https://github.com/OCA/project", "author": "Tecnativa, Onestein, Odoo Community Association (OCA)", diff --git a/project_timeline/hooks.py b/project_timeline/hooks.py deleted file mode 100644 index 8f289c38c0..0000000000 --- a/project_timeline/hooks.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 Open Source Integrators - Daniel Reis -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - - -def populate_date_start(cr, registry): - """ - The date_start was introduced to be used instead of date_assign. - To keep same behaviour on upgrade, initialize it - to have the same data as before. - """ - cr.execute( - "UPDATE project_task " - "SET date_start = date_assign " - "WHERE date_start IS NULL " - "AND date_assign IS NOT NULL" - ) diff --git a/project_timeline/migrations/14.0.1.5.1/post-migration.py b/project_timeline/migrations/14.0.1.5.1/post-migration.py new file mode 100644 index 0000000000..955770db54 --- /dev/null +++ b/project_timeline/migrations/14.0.1.5.1/post-migration.py @@ -0,0 +1,16 @@ +# Copyright 2024 Tecnativa - Juan José Seguí +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.logged_query( + env.cr, + """UPDATE project_task + SET planned_date_start = COALESCE(planned_date_start, date_assign, date_start), + planned_date_end = COALESCE(planned_date_end, date_end) + WHERE planned_date_start IS NULL AND planned_date_end IS NULL; + """, + ) diff --git a/project_timeline/models/project_task.py b/project_timeline/models/project_task.py index 38de489147..126b31361a 100644 --- a/project_timeline/models/project_task.py +++ b/project_timeline/models/project_task.py @@ -9,9 +9,5 @@ class ProjectTask(models.Model): _inherit = "project.task" - date_start = fields.Datetime("Start Date") - - def update_date_end(self, stage_id): - res = super().update_date_end(stage_id) - res.pop("date_end", None) - return res + planned_date_start = fields.Datetime("Start Date") + planned_date_end = fields.Datetime("End Date") diff --git a/project_timeline/readme/CONTRIBUTORS.rst b/project_timeline/readme/CONTRIBUTORS.rst index b314a14016..b073352c3d 100644 --- a/project_timeline/readme/CONTRIBUTORS.rst +++ b/project_timeline/readme/CONTRIBUTORS.rst @@ -8,6 +8,7 @@ * Pedro M. Baeza * Carlos Dauden * Alexandre Díaz + * Juan José Seguí * `Open Source Integrators `_: diff --git a/project_timeline/static/description/index.html b/project_timeline/static/description/index.html index e84adbc7fd..62c1f4cefa 100644 --- a/project_timeline/static/description/index.html +++ b/project_timeline/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -423,6 +423,7 @@

Contributors

  • Pedro M. Baeza
  • Carlos Dauden
  • Alexandre Díaz
  • +
  • Juan José Seguí
  • Open Source Integrators:
      @@ -434,7 +435,9 @@

      Contributors

      Maintainers

      This module is maintained by the OCA.

      -Odoo Community Association + +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.

      diff --git a/project_timeline/views/project_task_view.xml b/project_timeline/views/project_task_view.xml index 23f1508b3a..62158ae10c 100644 --- a/project_timeline/views/project_task_view.xml +++ b/project_timeline/views/project_task_view.xml @@ -11,8 +11,8 @@ timeline timeline @@ -111,8 +111,8 @@ - - + +